Skip to content

Kinlaw/event-horizon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

event-horizon

NPM version Downloads

Eats things that happen too many times per time window. A time window in this case is a sliding window.

Example

Simple

var horizon = require('event-horizon').instance({window: 200, max: 50});
horizon.run(function () {
    request(...);
});

With a callback

var horizon = require('event-horizon').instance({window: 200, max: 50});
horizon.run(function () {
    request(...);
}, function () {
    deferred.reject();
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%