Skip to content

Instantly share code, notes, and snippets.

@UsamaAshraf
Last active November 3, 2018 10:53
Show Gist options
  • Save UsamaAshraf/edb90f8e1a061f6eb8d1abe2db24f8ea to your computer and use it in GitHub Desktop.
Save UsamaAshraf/edb90f8e1a061f6eb8d1abe2db24f8ea to your computer and use it in GitHub Desktop.
const myEmitter = require('./my_emitter');
// Perform the registration steps
// Pass the new user object as the message passed through by this event.
myEmitter.emit('user-registered', user);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment