foreach

2.0.6last stable release 3 years ago
Complexity Score
Low
Open Issues
5
Dependent Projects
194
Weekly Downloadsglobal
2,544,350

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

foreach

Iterate over the key value pairs of either an array-like object or a dictionary like object.

API

foreach(object, function, [context])

var each = require('foreach');

each([1,2,3], function (value, key, array) {
    // value === 1, 2, 3
    // key === 0, 1, 2
    // array === [1, 2, 3]
});

each({0:1,1:2,2:3}, function (value, key, object) {
    // value === 1, 2, 3
    // key === 0, 1, 2
    // object === {0:1,1:2,2:3}
});

Dependencies

No runtime dependency information found for this package.

CVE IssuesActive
0
Scorecards Score
3.30
Test Coverage
No Data
Follows Semver
Yes
Github Stars
25
Dependenciestotal
2
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute foreach in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install foreach
Processing...
Done

8 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.