New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

writefile

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

writefile

safer file writing for node

  • 0.2.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

writefile

safer file writing for node

Getting Started

With npm

$ npm install writefile --save

then in your app:

var writefile = require('writefile')

API

  • fromBuffer()
  • fromStream()

both these function return Results though they expose their internal callback based APIs as fn.plain. Feel free to use those functions instead.

fromBuffer(path:String, text:String)

fs.writeFile() but makes parent directories if required

fromStream(path:String, text:Stream)

as above but accepts a Stream instead of a String

Running the tests

$ npm install
$ node test

Keywords

FAQs

Package last updated on 05 Jun 2014

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