simple-iterator

0.0.2 • Public • Published

Iterates over an array and sets scope to the current item, and index as parameter. Returns null if it isn't an array.

Install

npm install simple-iterator --save

Usage

var iterator = require('simple-iterator');

var array = ['Foo', 'bar', '2000'];

iterator(array, function(index) {
    console.log(this + ' item has index ' + index);
});

Author

Patrik Höggren
patrik (a) hwkdev.se

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i simple-iterator

Weekly Downloads

0

Version

0.0.2

License

ISC

Last publish

Collaborators

  • phoggren