odin-js-fundamentals-part-4/node_modules/for-each
NetMan 65754e6d19 Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
..
test Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
.editorconfig Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
.eslintrc Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
.travis.yml Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
LICENSE Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
README.md Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
index.js Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
package.json Ran npm install for whole directory 2024-01-05 20:30:21 +01:00

README.md

for-each build status

browser support

A better forEach.

Example

Like Array.prototype.forEach but works on objects.

var forEach = require("for-each")

forEach({ key: "value" }, function (value, key, object) {
    /* code */
})

As a bonus, it's also a perfectly function shim/polyfill for arrays too!

var forEach = require("for-each")

forEach([1, 2, 3], function (value, index, array) {
    /* code */
})

Installation

npm install for-each

Contributors

  • Raynos

MIT Licenced