fs-then-native

Wraps the Node.js fs library with a Promise API using whichever `Promise` implementation is available

MIT 7 个版本
安装
npm install fs-then-native
yarn add fs-then-native
pnpm add fs-then-native
bun add fs-then-native
README

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 <75pound@gmail.com>. Documented by jsdoc-to-markdown.

版本列表
2.0.0 2017-02-08
1.0.2 2016-10-09
1.0.1 2016-10-09
1.0.0 2016-10-09
0.1.2 2016-10-09
0.1.1 2016-10-07
0.1.0 2016-10-05