Package Exports
- then-fs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (then-fs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
then-fs
Promised version of the node.js fs
module.
All non-callback-taking functions of fs are simply inherited.
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