Last active
December 17, 2015 09:29
-
-
Save narqo/5587759 to your computer and use it in GitHub Desktop.
Some tricks with Promise-A+
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
var args = { /* ... */ }; | |
someActionThatRetrievesArchPromise() | |
.then(function(Arch) { | |
var arch = Arch.alterArch(); | |
return arch | |
.invoke.call(Arch, 'createExamplesNodes', args) | |
.then(function() { | |
return arch; | |
}); | |
}) | |
.then(function(arch) { | |
// do something \w `arch` object | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment