Eric Foster 35b96bc934 initial commit hace 8 años
..
.npmignore initial commit hace 8 años
LICENSE initial commit hace 8 años
Makefile initial commit hace 8 años
Readme.md initial commit hace 8 años
component.json initial commit hace 8 años
index.js initial commit hace 8 años
package.json initial commit hace 8 años
test.js initial commit hace 8 años

Readme.md

foreach

Iterate over the key value pairs of either an array-like object or a dictionary like object.

browser support

API

foreach(object, function, [context])

var each = require('foreach');

each([1,2,3], function (value, key, array) {
    // value === 1, 2, 3
    // key === 0, 1, 2
    // array === [1, 2, 3]
});

each({0:1,1:2,2:3}, function (value, key, object) {
    // value === 1, 2, 3
    // key === 0, 1, 2
    // object === {0:1,1:2,2:3}
});