cached-events
Cache an Event Emitter
Last updated 14 years ago by raynos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install cached-events 
SYNC missed versions from official npm registry.

cached-events

Cache an Event Emitter

Example

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)
})

Installation

npm install cached-events

Contributors

  • Raynos

MIT Licenced

Current Tags

  • 0.0.1                                ...           latest (14 years ago)

1 Versions

  • 0.0.1                                ...           14 years ago
Maintainers (1)
Downloads
Total 4
Today 0
This Week 1
This Month 4
Last Day 0
Last Week 3
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE