
noArrayIndent (default: false) - when true, will not add an indentation level to array elements.indent (default: 2) - indentation width to use (in spaces).However, you canĭisable exceptions by setting the skipInvalid option to true. Throw an exception if you try to dump regexps or functions. Iterator to each document if specified, or returns array of documents. Same as load(), but understands multi-document sources. The core schema also has no such restrictions. It allows numbers in any notation, use Null and NULL as null, etc. So, the JSON schema is not as strictly defined in the YAML specification. NOTE: JS-YAML does not support schema-specific tag resolution restrictions. NOTE: This function does not understand multi-document sources, it throws If true, then duplicate keys in a mapping will override values rather than throwing an error. json (default: false) - compatibility with JSON.parse behaviour.DEFAULT_SCHEMA - all supported YAML types.JSON_SCHEMA - all JSON-supported types:.FAILSAFE_SCHEMA - only strings, arrays and plain objects:.schema (default: DEFAULT_SCHEMA) - specifies a schema to use.Loader will call this function with an instance of YAMLException for each warning. onWarning (default: null) - function to call on warning messages.filename (default: null) - string to be used as a file path in.Not support regexps, functions and undefined. Plain object, a string, a number, null or undefined, or throws YAMLException on error. Get document, or throw exception on errorĬonst doc = yaml.load(fs.readFileSync('/home/ixti/example.yml', 'utf8'))

If you need advanced details (creatingįor more info. c, -compact Display errors in compact mode v, -version Show program's version number and exit. h, -help Show this help message and exit.
#AMAZON FIRE UDMX INSTALL#
If you want to inspect your YAML files from CLI, install js-yaml globally: npm install -g js-yaml Installation YAML module for node.js npm install js-yaml Now it's very fast, and supports 1.2 spec. Started as PyYAML port, it wasĬompletely rewritten from scratch.

This is an implementation of YAML, a human-friendly data JS-YAML - YAML 1.2 parser / writer for JavaScript
