node-fs-writefile-promise
fs.writeFile wrapped in an ES6 Promise
const writeFile = ; ;
A simple ES6 Promise-based wrapper around Node's built-in writeFile
.
Installation
npm i node-fs-writefile-promise
API
const writeFile = ;
writeFile(file, data [, options])
file: String
| Buffer
| Integer
filename or file descriptor
data: String
| Buffer
options: Object
| String
(fs.writeFile options)
Returns: (Promise)
Once the file is written, the returned promise will be resolved with no arguments.
If there is an error, the returned promise will be rejected with an error as its first argument.
const writeFile = ; const onFulfilled = console;const onRejected = console; ; ;
License
Copyright (c) 2014 - 2016 Stephen Meyerhofer
Licensed under the MIT License.