Created
September 25, 2015 10:57
-
-
Save perguth/1f363252dc9009b2a7eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var inherits = require( 'inherits') | |
| var EventEmitter = require( 'events').EventEmitter | |
| var instance | |
| inherits( Dispatcher, EventEmitter) | |
| module.exports = instance || | |
| (instance = new Dispatcher()) | |
| function Dispatcher (opts){ | |
| this.on( 'newHash', data =>{ | |
| console.log( 'hash is: ' + data) | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment