max_liu b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
test b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
.editorconfig b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
.nycrc b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
README.md b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
index.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
index.js b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
package.json b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 2 هفته پیش

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