for-each (0.3.5)

Published 2026-02-24 13:56:56 +00:00 by atheaadmin

Installation

registry=
npm install for-each@0.3.5
"for-each": "0.3.5"

About this package

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

Dependencies

Dependencies

ID Version
is-callable ^1.2.7

Development Dependencies

ID Version
@arethetypeswrong/cli ^0.17.3
@ljharb/eslint-config ^21.1.1
@ljharb/tsconfig ^0.2.3
@types/is-callable ^1.1.2
@types/tape ^5.8.1
auto-changelog ^2.5.0
eslint =8.8.0
npmignore ^0.3.1
nyc ^10.3.2
tape ^5.9.0
typescript next
Details
npm
2026-02-24 13:56:56 +00:00
1
Raynos
MIT
latest
7.9 KiB
Assets (1)
Versions (1) View all
0.3.5 2026-02-24