Skip to content

Instantly share code, notes, and snippets.

@dtothefp
Created December 6, 2015 03:15
Show Gist options
  • Save dtothefp/17c26d5b61f6e0cb597e to your computer and use it in GitHub Desktop.
Save dtothefp/17c26d5b61f6e0cb597e to your computer and use it in GitHub Desktop.
run(function *() {
const thunkedRead = thunk(fs.readFile);
try {
const contents = yield thunkedRead('/path/to/my/dope/file.js');
console.log(contents.toString());
} catch (err) {
console.log('Uh Oh', err);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment