fs-then-native

v2.0.0
Wraps the Node.js fs library with a Promise API using whichever `Promise` implementation is available
fs then promise native promises readFile writeFile

view on npm npm module downloads Build Status Coverage Status Dependency Status js-standard-style

fs-then-native

A minimal wrapper around the Node.js fs library adding a Promise API. It uses whichever Promise implementation is available, leaving responsibility one exists to the user.

Synopsis

fs.readFile('file.txt', 'utf8')
  .then(content => {
    // process file content
  })
  .catch(err => {
    // handle exception
  })

© 2016-17 Lloyd Brookes <[email protected]>. Documented by jsdoc-to-markdown.

npm i fs-then-native

Metadata

  • MIT
  • >=4.0.0
  • Lloyd Brookes
  • released 2/8/2017

Downloads

Maintainers