Name | Last modified | Size | Description | |
---|---|---|---|---|
Parent Directory | - | |||
test/ | 2 years ago | - | ||
LICENSE | 39 years ago | 1.0K | ||
index.js | 39 years ago | 1.7K | ||
package.json | 2 years ago | 2.4K | ||
README.md | 39 years ago | 746 | d7c1522 post receive test [كارل مبارك] |
A better forEach.
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 */
})
npm install for-each