p-ccr
v1.0.2
Published
A process concurrency async task solution
Downloads
92
Readme
CONCURRENCY PROCESSING
This package provides a solution for processing concurrent asynchronous tasks.
Installing
Using npm:
npm install p-ccr
Using yarn:
yarn add p-ccr
Usage
const { processConcurrency } = require("p-ccr");
processConcurrency({
// `items`: List of input items that will be passed as parameters to the function
items: [1, 2, 3, 4, 5],
// `func`: Processing function to handle each item
func: item => {
// Your code here to process each item
},
// `concurrency`: Number of items to process concurrently
concurrency: 2
});