1.1.0 • Published 2 years ago

rate-limiter-promise v1.1.0

Weekly downloads
3
License
Unlicense
Repository
github
Last release
2 years ago

rate-limiter-promise

A simple library to wrap methods with rate limiting.

npm version Test

Instalation

To install simply run:

$ npm install rate-limiter-promise

Or, if you use yarn:

$ yarn add rate-limiter-promise

Example usage

const limiter = require('rate-limiter-promise');
const fn = a => a*a;
const limitedFn = limiter(fn).to(1).per(1000);

const a = await limitedFn(2);

Test

To test, simply run:

$ npm test

You can also check for linting errors:

$ npm run lint

License

Unlicense

1.1.0

2 years ago

1.0.0

3 years ago

0.0.2

8 years ago

0.0.1

8 years ago