zhibo/live-streaming/client/node_modules/for-each
2025-12-15 11:34:49 +08:00
..
.github 初始化 2025-12-15 11:34:49 +08:00
test 初始化 2025-12-15 11:34:49 +08:00
.editorconfig 初始化 2025-12-15 11:34:49 +08:00
.eslintrc 初始化 2025-12-15 11:34:49 +08:00
.nycrc 初始化 2025-12-15 11:34:49 +08:00
CHANGELOG.md 初始化 2025-12-15 11:34:49 +08:00
index.d.ts 初始化 2025-12-15 11:34:49 +08:00
index.js 初始化 2025-12-15 11:34:49 +08:00
LICENSE 初始化 2025-12-15 11:34:49 +08:00
package.json 初始化 2025-12-15 11:34:49 +08:00
README.md 初始化 2025-12-15 11:34:49 +08:00
tsconfig.json 初始化 2025-12-15 11:34:49 +08:00

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