Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

yields/delegate-events

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

delegate-events

delegate events from one emitter to another

Installation

Install with component(1):

$ component install yields/delegate-events

API

delegate(a, b, events)

Delegate array of events from emitter a to emitter b.

Example

delegate(a, b, ['test']);

b.on('test', function(a, b){
  assert('a' == a);
  assert('b' == b);
});

a.emit('test', 'a', 'b');

Tests

$ make test

License

MIT

About

delegate events from one emitter to another

Resources

Stars

Watchers

Forks

Packages

No packages published