Created
August 25, 2014 18:07
-
-
Save ifandelse/ba69d565de78700e43a2 to your computer and use it in GitHub Desktop.
Adapting ES6 presentation example from Q to when.js
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
var gen = require('when/generator'); | |
gen.call(function* () { | |
try { | |
var [pratt, ferrell] = yield when.all([ | |
read("emmet.json"), | |
read("lordbusiness.json") | |
]); | |
render(pratt); | |
render(ferrell); | |
} catch (e) { | |
console.log("Not Awesome: " + e); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment