Created
December 19, 2015 15:01
-
-
Save dtothefp/fb1695b55a6027d569f6 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
const fromSpawn = spawn(function *() { | |
const someVal = yield new Promise((res, rej) => { | |
setTimeout(res.bind(null, 'whatevs!!!'), 1000); | |
}); | |
bloooBlaahhh | |
}); | |
fromSpawn.then((data) => { | |
console.log('Data from spawn', data); | |
}).catch((err) => { | |
console.error('Err from spawn', err.message); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment