then-fs
promised FS
Last updated 9 years ago by nathan7 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install then-fs 
SYNC missed versions from official npm registry.

then-fs

Promised version of the node.js fs module. All non-callback-taking functions of fs are simply inherited.

Build Status Dependency Status NPM version

Installation

$ npm install then-fs

API

The API for then-fs is exactly that of the built in fs module except that any function which normally takes a callback returns a promise instead.

Example:

function readJSON(path) {
  return fs.readFile(path, 'utf8').then(JSON.parse)
}
readJSON(__dirname + '/package.json')
  .done(function (obj) {
    console.dir(oj)
  })

License

MIT

Current Tags

  • 2.0.0                                ...           latest (9 years ago)

10 Versions

  • 2.0.0                                ...           9 years ago
  • 1.0.8                                ...           10 years ago
  • 1.0.7                                ...           10 years ago
  • 1.0.6                                ...           11 years ago
  • 1.0.5                                ...           11 years ago
  • 1.0.4                                ...           11 years ago
  • 1.0.3                                ...           11 years ago
  • 1.0.2                                ...           11 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
Downloads
Total 2
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE