@jmurrayjr/parallelfor

1.0.0 • Public • Published

parallelFor

A simple library for performing parallel asynchronous tasks

Install

npm install parallelFor

Usage

constant Parallel = require('parallelFor');

let options = {
	maxInProcess: 10
}

// Your async function can only accept one parameter, place your parameters in an object {}
async function myAsyncFunction(jsObject){
	//async code
}

let jsObjects = [
	{ parameter1: "value1", parameter2: "value4" },
	{ parameter1: "value2", parameter2: "value5" },
	{ parameter1: "value3", parameter2: "value6" }
]

await Parallel.for(jsObjects, myAsyncFunction, options);

Dependencies (2)

Dev Dependencies (1)

Package Sidebar

Install

npm i @jmurrayjr/parallelfor

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

184 kB

Total Files

9

Last publish

Collaborators

  • jmurrayjr