Cache an Event Emitter

npm install cached-events
1 downloads in the last day
33 downloads in the last week
299 downloads in the last month


Cache an Event Emitter


Stores the emitted event for an event in a cache and will immediately fire an attached event listeners if that event is in the cache.

Good for things where you want to be notified when something happens but don't want to worry about binding listeners before it happens

var CachedEmitter = require("../index")

var login = CachedEmitter()

login.emit("login", "steve", "jones")

login.on("login", function (user, pass) {
    console.log(user, pass)


npm install cached-events


  • Raynos

MIT Licenced

npm loves you