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.
blockvote/node_modules/for-each
STRIV1 f8251e172e
1
1 year ago
..
test 1 1 year ago
.editorconfig 1 1 year ago
.eslintrc 1 1 year ago
.travis.yml 1 1 year ago
LICENSE 1 1 year ago
README.md 1 1 year ago
index.js 1 1 year ago
package.json 1 1 year 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

Contributors

  • Raynos

MIT Licenced