Skip to content

Instantly share code, notes, and snippets.

@Qaaj
Created February 21, 2016 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qaaj/fc37fe89940abcf241fb to your computer and use it in GitHub Desktop.
Save Qaaj/fc37fe89940abcf241fb to your computer and use it in GitHub Desktop.
co(function *() {
// yield any promise
var a = yield getURLPromise('http://www.google.com')
var b = yield getURLPromise('http://www.apple.com')
var c = yield getURLPromise('http://www.microsoft.com')
debug([a, b, c]);
}).catch((error) =>{
debug("Something went wrong: ", error)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment