zlwu dd667101ef first commit hace 1 año
..
.github dd667101ef first commit hace 1 año
test dd667101ef first commit hace 1 año
.editorconfig dd667101ef first commit hace 1 año
.eslintrc dd667101ef first commit hace 1 año
.nycrc dd667101ef first commit hace 1 año
CHANGELOG.md dd667101ef first commit hace 1 año
LICENSE dd667101ef first commit hace 1 año
README.md dd667101ef first commit hace 1 año
index.d.ts dd667101ef first commit hace 1 año
index.js dd667101ef first commit hace 1 año
package.json dd667101ef first commit hace 1 año
tsconfig.json dd667101ef first commit hace 1 año

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

MIT Licenced