htc 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
..
.github 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
test 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
.editorconfig 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
.eslintrc 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
.nycrc 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
CHANGELOG.md 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
LICENSE 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
README.md 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
index.d.ts 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
index.js 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
package.json 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois
tsconfig.json 7ca38fdcbb 善行少年PC端首次提交(基础版) il y a 1 mois

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