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 May 7, 2024 via pnpm

async-each 1.0.6

No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.
Package summary
Share
0
issues
1
license
1
MIT
Package created
14 Jun 2013
Version published
4 Feb 2023
Maintainers
2
Total deps
1
Direct deps
0
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
1 Packages, Including:
async-each@1.0.6
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

0
All Dependencies CSV
β“˜ This is a list of async-each 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does async-each do?

Async-each is an ultra-simple, no-nonsense JavaScript library that implements an asynchronous parallel forEach function. It is super lightweight, with a codebase of only around 40 lines. This makes it an excellent alternative to bulkier async libraries that can sometimes be overkill for simpler tasks. Its primary use cases would be in situations where you need to perform the same operation on multiple items in parallel and asynchronously, such as reading multiple files at once or making multiple API requests. The package is compatible for use with both browsers and Node.js environments.

How do you use async-each?

To get started using async-each in your projects, first install the package via NPM using the command npm install async-each. Once installed, you can import it into your JavaScript file using the require function.

Here's a simple usage example:

var each = require('async-each');
each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) {
  if (error) console.error(error);
  console.log('Contents for a, b and c:', contents);
});

In the above code, async-each is being used to read the contents of three files ('a.js', 'b.js', and 'c.js') in parallel. The fs.readFile function is passed as the iterator, and an error-first callback function is supplied to handle the result.

For browser usage, simply include async-each before your scripts and use the global variable asyncEach:

asyncEach(list, fn, callback);

Where are the async-each docs?

Details and documentation about async-each can be found in the readme file on its GitHub repository page here. The readme includes the programming API, an explanation of its functions, and simple usage examples. Additionally, any new updates or changes are typically documented in the GitHub repository.