Created
March 7, 2018 16:19
-
-
Save dkstevekwak/053bab32411aaa0b94f2699e1ae17813 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* Promisified functions */ | |
| runEvalScript('firstFunction()') | |
| .then(function(firstResult){ | |
| return runEvalScript(`secondFunction(${firstResult})`) | |
| }) | |
| .then(function(secondResult){ | |
| return runEvalScript(`thirdFunction(${secondResult})`) | |
| }) | |
| .then(function(thirdResult){ | |
| // more promises..! | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment