Skip to content

arpan-jain/resolvelargearrpromises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

resolvelargearrpromises

A nodejs functionality to resolve large array of promises in a series of parallel batches, without hitting the call stack size.

Installation

To install this package, clone this git repository and include it in your project's node_modules or simply:

npm install resolvelargearrpromises

Require resolvelargearrpromises in your script and give it a variable name:

In commonJs:

const processLargeArrAsync = require('resolvelargearrpromises');

In ESM:

import {processLargeArrAsync} from 'resolvelargearrpromises';

Example

You will be able to use the functionality like :

const f1 = async f1(){
  const promises = [];
  const paralleLimit = 4 // number of parallel batch
  promises.push(some task)
  await processLargeArrAsync(promises, paralleLimit);
  return {result}
}


Contributions

If you want to contribute, feel free to open issues and send pull request

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published