discover · compare · collections · requirements · contribute · feed · watching · stats · help with your tokens
nodeca/js-yaml · source
Snapshot 0 · 2026-11-04T12:47:21Z · TypeScript · MIT
Content fingerprint
644e84cad15ae061e60c39c63099fd1efeca25eb6dfcf05801a3b01ef13efb2fGitHub description at capture
JavaScript YAML parser and dumper. Very fast.
README at capture
# js-yaml
[](https://github.com/nodeca/js-yaml/actions/workflows/ci.yml)
[](https://www.npmjs.org/package/js-yaml)
> YAML 1.2 parser and serializer for JavaScript.
__[Online demo](https://nodeca.github.io/js-yaml/)__
- Supports the YAML 1.2 and YAML 1.1 specifications.
- Passes the entire [YAML Test Suite](https://github.com/yaml/yaml-test-suite).
### [Documentation >>](https://nodeca.github.io/js-yaml/doc/)
##### Install
```bash
npm install js-yaml
```
##### Usage
```js
import { load } from 'js-yaml'
try {
const document = load('greeting: hello')
console.log(document.greeting)
} catch (e) {
console.error(e)
}
```
```js
import { dump } from 'js-yaml'
const source = dump({ greeting: 'hello' })
console.log(source)
```
[More usage examples](docs/usage.md).