README
Rotary
Rotary is a simple helper to rotate an ordered collection of data. I use this technique most often with sliders and don't want to rewrite this every single time.
Installation
$ npm install rotary-array
$ npm install marcusandre/rotary
Usage
var Rotary = require('rotary')
var r = Rotary([1, 2, 3])
r.next() // 2, 3, 1
r.previous() // 1, 2, 3
Todo
fn.get(num)
to rotate untilnum
is first item
Test & Coverage
$ make test
$ make coverage
License
MIT