You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
YZY eef3e25414
branch149
4 months ago
..
.github branch149 4 months ago
test branch149 4 months ago
.editorconfig branch149 4 months ago
.eslintrc branch149 4 months ago
.nycrc branch149 4 months ago
CHANGELOG.md branch149 4 months ago
LICENSE branch149 4 months ago
README.md branch149 4 months ago
index.d.ts branch149 4 months ago
index.js branch149 4 months ago
package.json branch149 4 months ago
tsconfig.json branch149 4 months ago

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