Skip to content

Instantly share code, notes, and snippets.

@chinmay185
Last active August 29, 2015 14:19
Show Gist options
  • Save chinmay185/0818a9c9a650d7ee88d8 to your computer and use it in GitHub Desktop.
Save chinmay185/0818a9c9a650d7ee88d8 to your computer and use it in GitHub Desktop.
getting rid of unnecessary deferred
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