This is a fork of JS-YAML which supports parsing of YAML into AST.
In additional to parsing YAML to AST, it has following features:
!includetag used in RAML
load method can be used to load the tree and returns a
YAMLNode class is an ancestor for all node kinds.
kind field determine node kind, one of
After node kind is determined, it can be cast to one of the
YAMLNode descendants types:
Scalars are one of the three main node types defined by YAML and are effectively leaf nodes.
There are many factors that can influence the type of datum represent in scalar node (context, schema, tag, etc.).
To help inspection of a
YAMLScalar to determine its datatype when a document uses the Core Schema, you can pass the
YAMLScalar to the
determineScalarType function. It will return an enum value indicating
Once you know the type, there are also some helper functions to help read the value by passing them the string,