0.0.2 • Published 8 years ago

simple-iterator v0.0.2

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

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