Skip to content
Agents tracked: 440 Downloads (7d): 202M down 19.5% GitHub stars: 10.4M Releases (7d): 607 Agent status: 1 with issuesSince last limit reset: Claude 28d · Codex 0d Updated Oct 21, 2026

js-yaml Examples You Can Edit and Run

4 small js-yaml examples written by AgentGid from the official docs, one feature each. Every one runs in your browser: change the code and see the result at once, or describe a change and let AI rewrite it. The screenshots are taken from the same code by our server, which also checks that each example starts without errors.

js-yaml: usage and stats 134 AI-built projects use it

Try them all in one place

import { load } from 'js-yaml'

const text = `
greeting: hello
version: 3
enabled: true
server:
  host: localhost
  port: 8080
languages:
  - en
  - de
  - ja
`

try {
  const document = load(text)
  console.log('greeting:', document.greeting)
  console.log('version:', document.version, '(' + typeof document.version + ')')
  console.log('enabled:', document.enabled, '(' + typeof document.enabled + ')')
  console.log('server.host:', document.server.host)
  console.log('server.port:', document.server.port)
  console.log('languages:', document.languages.join(', '))
  console.log('language count:', document.languages.length)
  console.log('as JSON:', JSON.stringify(document))
} catch (e) {
  console.log('error:', e.message)
}
Ctrl/⌘ + Enter runs

Free for signed-in members, with a daily limit. Describe the change in plain words; the new code runs only in your browser.

Add a new key to the YAML text and print it with another console.log line. Code written by AgentGid [1]. How it works, with a screenshot →

Checked Oct 12, 2026: each example starts without errors in Chromium with js-yaml 5.4.3. Needs WebGL.

Sources

  1. js-yaml README (GitHub)

Explanations written by AgentGid from the official docs; the numbers in brackets point here. The code marked "written by AgentGid" is ours and free to copy.

Building something with js-yaml? Ask AgentGid →