Overview of the yaml API layers
mainThe yaml library provides three layers of abstraction depending on your needs:
- Parse & Stringify: The simplest API for basic conversion between YAML strings and JavaScript values.
- Documents: Provides access to the full feature set, including comments, blank lines, and a decent AST (Abstract Syntax Tree) via the
Documentclass. - Lexer, Parser, and Composer: The lowest level, allowing you to work closely with the YAML source through tokens and the concrete syntax tree.
A command-line tool is also included.