RoundRound
A dead simple round-robin array iterator
Install
npm install roundround
Usage
var roundround = ; // Initialize RoundRound with any Array (null or undefined are ok as well, so no// guards necessary)var rr = ; // Then call the result to get the next element in the array; // => 1; // => 2; // => 3 // When reaching the end of the internal array, the iterator starts over from// the beginning; // => 1 // You can also specify an index from where RoundRound should startvar rr = ;; // => 2
License
MIT