npm.io
3.0.0 • Published 5 months ago

read-yaml-file

Licence
MIT
Version
3.0.0
Deps
2
Size
3 kB
Vulns
0
Weekly
0
Stars
104

read-yaml-file

Read and parse a YAML file

npm version

Installation

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

Usage

const readYamlFile = require('read-yaml-file')

readYamlFile('foo.yml').then(data => {
  console.log(data)
  //=> {foo: true}
})

API

readYamlFile(filepath)

Returns a promise for the parsed YAML.

readYamlFile.sync(filepath)

Returns the parsed YAML.

License

MIT Zoltan Kochan


This package was forked from load-yaml-file

Keywords