Skip to content

[Plugin] provides the module `eventemitter2` in the API (`noder` object) and/or `$di` container.

License

Notifications You must be signed in to change notification settings

noder-io/noder-eventemitter2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

noder-eventemitter2

Actual version published on NPM

Plugin for Noder.io that provides the module eventemitter2 in the API (noder object) and/or $di container.

Install

npm install --save noder-eventemitter2

Usage

noder.use('noder-eventemitter2')

To add eventemitter2 in your API

noder.$di.get('EventEmitterFactory');

// now, your API is an event emitter
noder.emit('event')

To add eventemitter2 in the $di container

noder.$di.get('EventEmitterDiFactory');

// now, your $di container is an event emitter
noder.$di.emit('event')

See the doc of eventemitter2 📘

Unit Tests

This plugin is fully tested with Unit.js and Mocha.

License

MIT (c) 2013, Nicolas Tallefourtane.

Author

Nicolas Tallefourtane - Nicolab.net
Nicolas Talle
Make a donation via Paypal

About

[Plugin] provides the module `eventemitter2` in the API (`noder` object) and/or `$di` container.

Resources

License

Stars

Watchers

Forks

Packages

No packages published