debounce-events

Global events debounce using redis
Installation
$ npm install --save debounce-events
Usage
Example 1:
var Channel = require('debounce-events');
var ch = new Channel(function update() {
});
ch.emit('update');
ch.emit('update');
ch.emit('update');
ch.emit('update');
Example 2:
var Redis = require('ioredis');
var Channel = require('debounce-events');
var ch = new Channel(function update() {
}, {
wait: 50,
adapter: Channel.ADAPTER_REDIS,
redisClient: new Redis()
});
ch.emit('update1');
ch.emit('update1');
ch.emit('update2');
License
MIT © Gaara