Skip to content

Instantly share code, notes, and snippets.

@Qaaj

Qaaj/co_example.js

Created Feb 21, 2016
Embed
What would you like to do?
co(function* () {
var result = yield Promise.resolve(true);
return result;
}).then(function (value) {
console.log(value);
}, function (err) {
console.error(err.stack);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.