Created
December 6, 2015 03:15
-
-
Save dtothefp/17c26d5b61f6e0cb597e 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
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