Last active
May 3, 2020 15:32
-
-
Save malavsoni/b52bb39b4b21a229b3a49c0ff821adb5 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 produceData = () => { | |
getData() | |
.then(result1 => processResult1(result1)) | |
.then(result2 => processResult2(result2)) | |
.then(result3 => return(result3)) | |
.catch (error) => { | |
return error | |
} | |
} | |
// Produce and Return Data | |
produceData() | |
.then(data => sendToClient(data)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment