simple-rlm

1.0.4 • Public • Published

SimpleRateLimitManager

A simple ratelimit manager

Greenkeeper badge Build Status Scrutinizer Code Quality npm version MIT Licence Open Source Love TypeScript

forthebadge

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

Readme

Keywords

none

Package Sidebar

Install

npm i simple-rlm

Weekly Downloads

1

Version

1.0.4

License

MIT

Last publish

Collaborators

  • skarajic