@dkx/parallel-runner
v0.0.1
Published
Parallel runner with promises
Downloads
3
Readme
DKX/ParallelRunner
Simple promise parallel runner for node.js.
Installation
$ npm install --save @dkx/parallel-runner
or with yarn
$ yarn add @dkx/parallel-runner
Usage
import {runInParallel} from '@dkx/parallel-runner';
(async () => {
await runInParallel(2, [1, 2, 3, 4, 5], async (item: number) => {
await doSomethingWithItem(item);
});
console.log('all items were processed in 2 threads');
})();