node-singleton-event

0.0.4 • Public • Published

node-singleton-event

Join the chat at https://gitter.im/teawithfruit/node-singleton-event

A global event bus driven by a singlton event emitter class. Use this module to hook something in other objects.

Install

npm install node-singleton-event -save

How to use

Require it in every file where you want to communicate with another file.

Say something:

var singletonevent = require('node-singleton-event');
singletonevent.emit('talk', 'hello world');

Receive something:

var singletonevent = require('node-singleton-event');
singletonevent.on('talk', function(value) {
  console.log(value);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    0
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i node-singleton-event

Weekly Downloads

0

Version

0.0.4

License

ISC

Last publish

Collaborators

  • teawithfruit