Last active
August 29, 2015 14:19
-
-
Save chinmay185/0818a9c9a650d7ee88d8 to your computer and use it in GitHub Desktop.
getting rid of unnecessary deferred
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
var getUserEmail = function (username) { | |
return userRepository.find(username).then(function (user) { | |
return user.email; | |
}); | |
}; | |
getUserEmail("emma").then(console.log); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment