Parse a config document (JSON or YAML) into an object.
The raw document.
The format (yaml imports js-yaml lazily).
yaml
js-yaml
The parsed object.
When YAML is requested without js-yaml, or parsing fails.
Parse a config document (JSON or YAML) into an object.