1.0.4 • Published 7 years ago
simple-rlm v1.0.4
SimpleRateLimitManager
A simple ratelimit manager
What is it?
it's a deadsimple ratelimit manager. It does what it says. it contains one function called call which has a few setup options.
Get Started
install the wrapper by entering:
npm install --save simple-rlm
proceed by importing the wrapper and creating the SimpleRateLimitManager object.
import RateManager from 'simple-rlm'
/** Create Wrapper Object */
const rlm = new RateManager(1000, 3600)
rlm.call('wait', (callsLeft, periodLeft, error) => {
if (err) {
console.log(err)
} else {
//perform the thing you want to do
}
})
For the documentation and example click here