speed-limit

1.0.5 • Public • Published

speed-limit

Installation

npm i speed-limit

Example

var limit = require('speed-limit');
 
// note: it returns promise
function myFunc () {
    return db('orders').whereNotNull('price');
}
 
// limit call rate to 1 call per 1 sec with jitter ±200 msec
var myFuncLimited = limit(myFunc, { limit: 1, per: 1000, jitter: 200 });

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i speed-limit

Weekly Downloads

1

Version

1.0.5

License

MIT

Last publish

Collaborators

  • titarenko