prc b6c02717e6 Upload complete no-internet building environment. | 1 жил өмнө | |
---|---|---|
.. | ||
test | 1 жил өмнө | |
.editorconfig | 1 жил өмнө | |
.eslintrc | 1 жил өмнө | |
.travis.yml | 1 жил өмнө | |
LICENSE | 1 жил өмнө | |
README.md | 1 жил өмнө | |
index.js | 1 жил өмнө | |
package.json | 1 жил өмнө |
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