Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Nov 20th, 2018 79 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. var events = require('events');
  2. var util = require('util');
  3.  
  4. var Emitter = function() {
  5.     this.domain = 'abc.com';
  6. };
  7.  
  8. util.inherits(Emitter, events.EventEmitter);
  9.  
  10. var emitter = new Emitter();
  11.  
  12. emitter.on('test', function() {
  13.     console.log('success');
  14. });
  15.  
  16. emitter.emit('test');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top