parseAll
parseAll(
text):unknown[]
Defined in: src/index.ts:548
Parse a multi-document stream into an array of values, one entry per document.
Documents are separated by --- (start) and/or ... (end) markers; a
stream with no markers at all is a single (possibly bare) document, same as
parse. A source with no documents returns an empty array.
Parameters
Section titled “Parameters”string
The YAML source text, potentially containing multiple documents.
Returns
Section titled “Returns”unknown[]
One value per document, in document order.
Throws
Section titled “Throws”YAMLParseError if any document in the stream is not well-formed YAML.
Example
Section titled “Example”parseAll("---\ndish: pancakes\n---\ndish: omelette\n")// [{ dish: "pancakes" }, { dish: "omelette" }]