Skip to content

luckydrq/power-ee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

power-ee

NPM version build status Test coverage

Enhance node's EventEmitter.

Install

$ npm install power-ee

Example

You can see the test cases.

Api

listenTo(target, events[, callback])

  • target(EventEmitter): required
  • events(String|Array): required
  • callback(Function): optional. Called each time the event of the list emitted.

delegate(target, events[, callback])

  • target(EventEmitter): required
  • events(String|Array): required
  • callback(Function): optional. Called each time the event of the list emitted.

Note: The difference between #delegate and #listenTo is that the source ee object will emit the same event as the target just emits.

undelegate(target[, events])

alias: stopListening

  • target(EventEmitter): required
  • events(String|Array): optional. If omitted, all the events related will be removed.

Lisence

MIT

About

Enhance node's EventEmitter

Resources

Stars

Watchers

Forks

Packages

No packages published