Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fs-writefile-promise

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-writefile-promise

Promise version of fs.writefile

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51K
increased by8.17%
Maintainers
1
Weekly downloads
 
Created
Source

fs-writefile-promise version License

Promise version of fs.writefile:

Match files using the patterns the shell uses, like stars and stuff.

Build Status Downloads Code Climate Coverage Status Dependencies

Install

npm install --save fs-writefile-promise

API

var write = require('fs-writefile-promise')

write(filename, data [, options])

filename: String
data String or Buffer
options: Object
Return: Object (Promise)

When it finishes, it will be fulfilled with the file name that was written to.

When it fails, it will be rejected with an error as its first argument.

write('/tmp/foo', 'bar')
  .then(function (filename) {
    console.log(filename) //=> '/tmp/foo'
  })

  .catch(function (err) {
    console.error(err)
  })
})
options

The option object will be directly passed to fs.writefile.

License

ISC License © Ahmad Nassri

Keywords

FAQs

Package last updated on 21 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc