-
-
Save pionize/2fd75981c58efd2752928ead2ba9b3f4 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
function onGetUserAndUserAccount(user, userAccount) { | |
return doSomething(user, userAccount); | |
} | |
function onGetUser(user) { | |
return getUserAccountById(user.id).then(function (userAccount) { | |
return onGetUserAndUserAccount(user, userAccount); | |
}); | |
} | |
getUserByName('andrew') | |
.then(onGetUser) | |
.then(onGetCompany) | |
.then(onGetJob) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment