mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-31 04:33:40 +00:00
18 lines
732 B
JavaScript
18 lines
732 B
JavaScript
// Ported from js-yaml v3.13.1:
|
|
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
|
import { load, loadAll } from "./loader/loader.js";
|
|
/**
|
|
* Parses `content` as single YAML document.
|
|
*
|
|
* Returns a JavaScript object or throws `YAMLException` on error.
|
|
* By default, does not support regexps, functions and undefined. This method is safe for untrusted data.
|
|
*/
|
|
export function parse(content, options) {
|
|
return load(content, options);
|
|
}
|
|
export function parseAll(content, iterator, options) {
|
|
return loadAll(content, iterator, options);
|
|
}
|