Skip to content

Instantly share code, notes, and snippets.

View dchester's full-sized avatar

David Chester dchester

View GitHub Profile
@dchester
dchester / example.js
Last active March 26, 2016 23:56
Example with fs module and async-generator
var async = require('generator-async');
// load `fs` with async's `require`
var fs = async.require('fs');
async.run(function*() {
// read a file
var passwd = yield fs.readFile('/etc/passwd');