sensordb2 e64a8defe5 3.17 | 1 gadu atpakaļ | |
---|---|---|
.. | ||
.npmignore | 1 gadu atpakaļ | |
LICENSE | 1 gadu atpakaļ | |
Makefile | 1 gadu atpakaļ | |
Readme.md | 1 gadu atpakaļ | |
component.json | 1 gadu atpakaļ | |
index.js | 1 gadu atpakaļ | |
package.json | 1 gadu atpakaļ | |
test.js | 1 gadu atpakaļ |
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}
});