0.0.3 • Published 5 years ago

func-limiter v0.0.3

Weekly downloads
-
License
MIT License
Repository
github
Last release
5 years ago

func-limiter.js

IT LIMITS RATE

USE IT LIKE THAT

const funclim = require('func-limiter');
let new_fn = funclim(old_fn, milliseconds);

EXAMPLE

const funclim = require('func-limiter');

let hey = function(x) {
    console.log('hey', x);
}

hey('adam');
hey('paul');
hey('jack');
// too fast !!!

let hey_rl = funclim(hey, 1000);

hey_rl('adam');
hey_rl('paul');
hey_rl('jack');
// slow and steady
0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago