tree: 6d80a46bad2909f084baa6c48f7a8b930cdb07c1
  1. bin/
  2. dist/
  3. LICENSE
  4. package.json
  5. README.md
node_modules/js-yaml/README.md

js-yaml

CI NPM version

YAML 1.2 parser and serializer for JavaScript.

Online demo

  • Supports the YAML 1.2 and YAML 1.1 specifications.
  • Passes the entire YAML Test Suite.

Documentation >>

Install
npm install js-yaml
Usage
import { load } from 'js-yaml'

try {
  const document = load('greeting: hello')
  console.log(document.greeting)
} catch (e) {
  console.error(e)
}
import { dump } from 'js-yaml'

const source = dump({ greeting: 'hello' })
console.log(source)

More usage examples.