arrcur
v1.0.2
Published
Run through arrays and complete
Downloads
7
Readme
arrcur v1.0.2
Iterates over an array and calls back on completion.
Installation
Using npm:
npm install arrcur --save
Usage
In Node.js:
var arrcur = require('arrcur');
arrcur([1, 2, 3, 4, 5, 6], function(val, key) {
console.log(val, key);
}, function() {
console.log('Done!');
});
// arrcur(value, each, done);
Parameters:
- value - object to iterate
- each - callback for each item
- done - callback on last item
Accepted value types:
- Arrays - each value
- Objects - each value
- Strings - each character
Test
Tests are written in mocha, install dev-dependencies then run:
npm test