js-array-iterator

0.1.0 • Public • Published

js-array-iterator

Stepping through an array is sometimes very useful...sometimes. This module is not a replacement for async! it is something different, I needed to call a .next() method to continue the stepping and an event fired if the next array item is arrived:

var testIterator = new Iterator([0,1,2,3,4,5]);
 
testIterator.on('next', function (element) {
  console.log(element);
  testIterator.next();
}).on('end', function () {
  console.log('stepped through! ;)');
});
 
testIterator.next();

LICENSE

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    2

Package Sidebar

Install

npm i js-array-iterator

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • johannesboyne