Skip to main content

Settings

Color Mode

Theme Skin

Background

Appearance preferences are saved in this browser only.

Environment

Current Environment Production

Built with JEKYLL_ENV=production. Changes require deployment.

Quick Links

Theme & Build

Jekyll v3.10.0
Last BuildSep 09, 03:03

Page Info

Layout default
Collection none
Path node_modules/js-yaml/README.md
URL /node_modules/js-yaml/

js-yaml

Table of Contents

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.