Socket
Socket
Sign inDemoInstall

write-yaml-file

Package Overview
Dependencies
2
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

write-yaml-file


Version published
Maintainers
1
Install size
621 kB
Created

Readme

Source

write-yaml-file

Stringify and write YAML to a file atomically

Creates directories for you as needed.

Installation

<pnpm|yarn|npm> add write-yaml-file

Usage

const writeYamlFile = require('write-yaml-file')

writeYamlFile('foo.yaml', {foo: true}).then(() => {
  console.log('done')
})

API

writeYamlFile(filepath, data, [options])

Returns a promise.

writeYamlFile.sync(filepath, data, [options])

options

Same options that can be passed in to js-yaml

mode

Type: number Default 438 (0666 in octal)

Mode used when writing the file.

  • load-yaml-file - Read and parse a YAML file

License

MIT © Zoltan Kochan

Keywords

FAQs

Last updated on 11 Feb 2021

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc