Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

@ycm.jason/asyncLimit

Limits the concurrent calls to a function.

Install

npm i --save @ycm.jason/async-limit

Usage

const readFile = require('util').promisify(require('fs').readFile);
const asyncLimit = requrie('@ycm.jason/async-limit');

const limitedReadFile = asyncLimit(readFile, 10);

// limitedReadFile can only have 10 concurrent calls at the same time

Author

Jason Yu

About

Limit the number of concurrent asynchronous calls to a function.

Resources

Releases

No releases published

Packages

No packages published