Skip to content

Instantly share code, notes, and snippets.

@Gozala
Created October 27, 2010 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gozala/648918 to your computer and use it in GitHub Desktop.
Save Gozala/648918 to your computer and use it in GitHub Desktop.
Examples of using promised-fs
var Promised = require('promised-utils').Promised
, fs = require('promised-fs')
var lines = Promised(function lines(data) {
return data.split('\n')
})
var data = fs.read('./README.md')
var myLines = lines(data)
var fs = require('promised-fs')
var data = fs.read('./README.md')
fs.write('./whatever', data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment