read-yaml-file
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

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.

Related

License

MIT © Zoltan Kochan


This package was forked from load-yaml-file

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.0
    875,467
    • latest
  • 2.1.0
    875,467
    • next
  • 2.0.0
    1,634
    • pnpm-temp

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.1.0
    875,467
  • 2.0.1
    11
  • 2.0.0
    1,634
  • 1.1.0
    922,364
  • 1.0.0
    101

Package Sidebar

Install

npm i read-yaml-file

Weekly Downloads

1,799,577

Version

2.1.0

License

MIT

Unpacked Size

3.34 kB

Total Files

6

Last publish

Collaborators

  • zkochan