fs-writefile-promise
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"name": "fs-writefile-promise", | ||
@@ -4,0 +4,0 @@ "description": "Promise version of fs.writefile", |
@@ -5,3 +5,3 @@ # fs.writeFile Promise | ||
> [Promise][] version of [fs.writefile][]: | ||
> [Promise][] version of [fs.writeFile][]: | ||
> Asynchronously writes data to a file, replacing the file if it already exists. | ||
@@ -33,10 +33,4 @@ | ||
write('/tmp/foo', 'bar') | ||
.then(function (filename) { | ||
console.log(filename) //=> '/tmp/foo' | ||
}) | ||
.catch(function (err) { | ||
console.error(err) | ||
}) | ||
}) | ||
.then(filename => console.log(filename)) //=> '/tmp/foo' | ||
.catch(err => console.error(err)) | ||
``` | ||
@@ -46,3 +40,3 @@ | ||
The option object will be directly passed to [fs.writefile](https://nodejs.org/api/fs.html#fs_fs_writefile_filename_data_options_callback). | ||
The option object will be directly passed to [fs.writeFile][]. | ||
@@ -63,3 +57,3 @@ --- | ||
[fs.writefile]: https://nodejs.org/api/fs.html#fs_fs_writefile_filename_data_options_callback | ||
[fs.writefile]: https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback | ||
[promise]: http://promisesaplus.com/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4350
56