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

run-parallel 1.2.0

Run an array of functions in parallel
Package summary
Share
0
issues
1
license
2
MIT
Package created
12 Apr 2014
Version published
10 Feb 2021
Maintainers
1
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:
queue-microtask@1.2.3
run-parallel@1.2.0
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 run-parallel 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
queue-microtask1.2.33.59 kBMIT
prod

Visualizations

Frequently Asked Questions

What does run-parallel do?

Run-parallel is an npm package that executes an array of functions in parallel, meaning it doesn't wait for the previous function to complete before starting the next one. This can be incredibly useful for improving the performance of JavaScript applications as it allows for multiple tasks to be performed simultaneously. If any of the functions pass an error to their callback, the main callback is executed immediately with the error's value. Once the tasks are done, the results are handed over to the final callback as an array.

How do you use run-parallel?

The run-parallel package can be installed using npm with the command npm install run-parallel. After installation, you can import it into your JavaScript file with var parallel = require('run-parallel').

You can use run-parallel by creating an array of functions and passing this array into the parallel function. Each function you include should call a callback function upon completion with a potential error and result value.

Here is an example of how to actually use run-parallel in code:

var parallel = require('run-parallel')

parallel([
  function (callback) {
    setTimeout(function () {
      callback(null, 'one')
    }, 200)
  },
  function (callback) {
    setTimeout(function () {
      callback(null, 'two')
    }, 100)
  }
], function (err, results) {
  // This optional callback will run once all tasks have completed
  // The results array here will equal ['one','two']
});

In this example, the package is being used to run two functions in parallel. Each function is using a setTimeout to mimic asynchronous behavior.

It should be noted that the callback(err, results) at the end is optional. If used, this is where you will handle the results from all of your parallel functions.

Where are the run-parallel docs?

The documentation for run-parallel can be found on its GitHub page at git://github.com/feross/run-parallel.git. This page includes a brief description of what the package does, instructions on how to install and use it, and an example of the package in action. Please make sure to review each of these sections for a thorough understanding of run-parallel and its capabilities.