npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

then-fs

2.0.0 • Public • Published

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

install

npm i then-fs

Downloadsweekly downloads

155,663

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability