@ycm.jason/async-limit

0.1.2 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @ycm.jason/async-limit

Weekly Downloads

20

Version

0.1.2

License

ISC

Unpacked Size

2.05 kB

Total Files

4

Last publish

Collaborators

  • ycm.jason