A simple JavaScript component to iterate an array round robin.
Sometimes you want to loop over an array and start at the beginning again.
npm install --save rr
component install jprichardson/rr
bower install rr
<script src="/path/to/rr.js"></script>
var rr = require('rr')
var list = ['a', 'b', 'c']
console.log(rr(list)) //a
console.log(rr(list)) //b
console.log(rr(list)) //c
console.log(rr(list)) //a
console.log(rr(list,1)) //c
console.log(rr(list,2)) //a
(MIT License)
Copyright 2013, JP Richardson