Created
November 3, 2018 16:01
-
-
Save UsamaAshraf/fed128977a4e3d232fdee4628405cb0b to your computer and use it in GitHub Desktop.
This file contains 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
const myEmitter = require('./my_emitter'); | |
// Perform the registration steps | |
// The application should react differently if the new user has been activated instantly. | |
if (user.activated) { | |
myEmitter.emit('user-registered:activated', user); | |
} else { | |
myEmitter.emit('user-registered', user); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment