1.1.0 • Published 10 years ago
rotary-array v1.1.0
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/rotaryUsage
var Rotary = require('rotary')
var r = Rotary([1, 2, 3])
r.next() // 2, 3, 1
r.previous() // 1, 2, 3Todo
fn.get(num)to rotate untilnumis first item
Test & Coverage
$ make test
$ make coverageLicense
MIT
1.1.0
10 years ago