import { parseAll } from "https://deno.land/x/lume@v1.15.0/deps/yaml.ts";
Same as parse()
, but understands multi-document sources.
Applies iterator to each document if specified, or returns array of documents.
Examples
Example 1
Example 1
import { parseAll } from "https://deno.land/std@0.224.0/encoding/yaml.ts";
const data = parseAll(`
---
id: 1
name: Alice
---
id: 2
name: Bob
---
id: 3
name: Eve
`);
console.log(data);
// => [ { id: 1, name: "Alice" }, { id: 2, name: "Bob" }, { id: 3, name: "Eve" } ]
Parameters
optional
options: ParseOptions