Skip to content

Instantly share code, notes, and snippets.

@Clokze
Created November 27, 2013 19:39
Show Gist options
  • Select an option

  • Save Clokze/7681880 to your computer and use it in GitHub Desktop.

Select an option

Save Clokze/7681880 to your computer and use it in GitHub Desktop.
pseudocode of sync wrapper
function readFile (file) {
var f = generator(function () {
fs.readFile(file, function (err, data) {
yield data;
}
}
return f.run();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment