Skip to content

Instantly share code, notes, and snippets.

@domachine
Created February 3, 2016 14:22
Show Gist options
  • Save domachine/6c1227e33ef3ade7bae0 to your computer and use it in GitHub Desktop.
Save domachine/6c1227e33ef3ade7bae0 to your computer and use it in GitHub Desktop.
function *myGenerator() {
const a = yield { fn: performingIO };
return a;
}
const it = myGenerator();
assert.deepEqual(it.next(), { value: { fn: performingIO }, done: false });
assert.deepEqual(it.next(34), { value: 34, done: true });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment