Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 15, 2024 via pnpm

for-each 0.3.3

A better forEach
Package summary
Share
0
issues
1
license
2
MIT
Package created
29 Sep 2012
Version published
2 Jun 2018
Maintainers
2
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
for-each@0.3.3
is-callable@1.2.7
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of for-each 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
is-callable1.2.79.66 kBMIT
prod

Visualizations

Frequently Asked Questions

What does for-each do?

"For-each" is an npm package that augments the functionality of JavaScript's traditional Array.prototype.forEach method. It not only works well on traditional arrays but also shines when used on objects, something Array.prototype.forEach cannot inherently do. This makes it an invaluable tool for developers looking for a reliable way to iterate over data stored in JavaScript Objects.

How do you use for-each?

To use "for-each", you will first need to install it via NPM using the command npm install for-each. After it's installed, you can require it in your JavaScript file and then use it to iterate over both arrays and objects. Below are two examples:

var forEach = require("for-each")

forEach({ key: "value" }, function (value, key, object) {
    /* code */
})

You see here how "for-each" can be used on a JavaScript object. The function accepts two arguments - the object and a callback. The callback in turn receives three arguments - the value of the current property, the key of the current property, and the original object.

var forEach = require("for-each")

forEach([1, 2, 3], function (value, index, array) {
    /* code */
})

In this example, "for-each" is used like the traditional forEach method on an array. Here, the function accepts an array and a callback. The callback receives the value of the current element, the index of the current element, and the original array.

Where are the for-each docs?

The documentation for "for-each" can be found on its GitHub page (https://github.com/Raynos/for-each.git). The README file there contains all the necessary information about its capabilities, installation process, and usage along with code examples.