Home

Awesome

Load YAML file

Read and parse a YAML file.

Installation

npm install --save load-yaml-file

Usage

import { loadYamlFile } from 'load-yaml-file'

const data = await loadYamlFile('foo.yml')
console.log(data)
//=> {foo: true}

Sync

import { loadYamlFileSync } from 'load-yaml-file'

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

API

loadYamlFile(path)

loadYamlFileSync(path)

Related