lxy 1c63d88d40 demo 2 gadi atpakaļ
..
test 1c63d88d40 demo 2 gadi atpakaļ
.editorconfig 1c63d88d40 demo 2 gadi atpakaļ
.eslintrc 1c63d88d40 demo 2 gadi atpakaļ
.travis.yml 1c63d88d40 demo 2 gadi atpakaļ
LICENSE 1c63d88d40 demo 2 gadi atpakaļ
README.md 1c63d88d40 demo 2 gadi atpakaļ
index.js 1c63d88d40 demo 2 gadi atpakaļ
package.json 1c63d88d40 demo 2 gadi atpakaļ

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