Eric Foster d5378345de connection between front end and database | il y a 6 ans | |
---|---|---|
.. | ||
.npmignore | il y a 6 ans | |
LICENSE | il y a 6 ans | |
Makefile | il y a 6 ans | |
Readme.md | il y a 6 ans | |
component.json | il y a 6 ans | |
index.js | il y a 6 ans | |
package.json | il y a 6 ans | |
test.js | il y a 6 ans |
Iterate over the key value pairs of either an array-like object or a dictionary like object.
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}
});