biofriction-wp-theme/node_modules/foreach
jorge a7910c81a8 moved to new repo 2021-10-26 14:18:09 +02:00
..
.npmignore moved to new repo 2021-10-26 14:18:09 +02:00
LICENSE moved to new repo 2021-10-26 14:18:09 +02:00
Makefile moved to new repo 2021-10-26 14:18:09 +02:00
Readme.md moved to new repo 2021-10-26 14:18:09 +02:00
component.json moved to new repo 2021-10-26 14:18:09 +02:00
index.js moved to new repo 2021-10-26 14:18:09 +02:00
package.json moved to new repo 2021-10-26 14:18:09 +02:00
test.js moved to new repo 2021-10-26 14:18:09 +02:00

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}
});