JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 653225
  • Score
    100M100P100Q197895F
  • License MIT

Stringify and write YAML to a file atomically

Package Exports

  • write-yaml-file

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (write-yaml-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

write-yaml-file

Build Status

Stringify and write YAML to a file atomically

Creates directories for you as needed.

Installation

npm i -S 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.

License

MIT © Zoltan Kochan