emits

Simple cross-platform event emitter.

npm install emits
7 downloads in the last month

[!] emits became energy

$ npm install energy

API (0.0)

emits()emits instance

// Create an emitter
var emitter = emits()

Methods

emitter inherits from emits.prototype

  • emitter.listeners(event) ⇒ array
  • emitter.on(event, fn) ⇒ emitter
  • emitter.off(event?, fn?, occurrences?) ⇒ emitter
  • emitter.emit(event, args...) ⇒ integer
  • emitter.once(event, fn) ⇒ emitter
  • emitter.many(event, times, fn) ⇒ emitter
  • emitter.init() ⇒ emitter

Utilities

  • emits.applies(fns, scope, args, breaker?) ⇒ integer

License

MIT

npm loves you