Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

load-yml

saqqdy1.3kMIT1.4.0TypeScript support: included

Read and parse a .yaml or .yml file

yaml, load-yaml, load-yml, yaml-parser, saqqdy

readme

load-yml

Read and parse a .yaml or .yml file

NPM version Codacy Badge tree shaking typescript Test coverage npm download License

Sonar

Installing

# use pnpm
$ pnpm install load-yml

# use npm
$ npm install load-yml --save

# use yarn
$ yarn add load-yml

Usage

  1. use load-yml in async mode
import { loadYml } from 'load-yml'

loadYml().then(path => {
  console.log('result is: ', path) // { "name": "saqqdy" }
})
  1. use load-yml in sync mode
import { loadYmlSync } from 'load-yml'

console.log('result is: ', loadYmlSync()) // { "name": "saqqdy" }

Support & Issues

Please open an issue here.

License

MIT

changelog

Change logs

2023.08.28 v1.4.0

  1. throw ENOENT error
  2. fix bugs
  3. upgrade all packages

2023.03.01 v1.3.0

  1. fix export types
  2. downgrade to support node12.20
  3. move core-js from dependencies to devDependencies
  4. upgrade all packages

2023.02.04 v1.2.0

  1. drop un-used pkg
  2. fix dependencies

2023.02.04 v1.1.1

  1. fix export types

2023.02.04 v1.1.0

  1. export parseYml & stringifyYml
  2. throw out errors
  3. fix dependencies

2023.02.03 v1.0.0

  1. create project
  2. README.md