import { Document } from "https://deno.land/x/windmill@v1.417.0/node_modules/yaml/browser/index.js";
Methods
Adds a value to the document.
Adds a value to the document.
Create a deep copy of this Document and its contents.
Custom Node values that inherit from Object
still refer to their original instances.
Create a new Alias
node, ensuring that the target node
has the required anchor.
If node
already has an anchor, name
is ignored.
Otherwise, the node.anchor
value will be set to name
,
or if an anchor with that name is already present in the document,
name
will be used as a prefix for a new unique anchor.
If name
is undefined, the generated anchor will use 'a' as a prefix.
Convert a key and a value into a Pair
using the current schema,
recursively wrapping all values as Scalar
or Collection
nodes.
Removes a value from the document.
Removes a value from the document.
Returns item at key
, or undefined
if not found. By default unwraps
scalar values from their surrounding node; to disable set keepScalar
to
true
(collections are always returned intact).
Returns item at path
, or undefined
if not found. By default unwraps
scalar values from their surrounding node; to disable set keepScalar
to
true
(collections are always returned intact).
Checks if the document includes a value with the key key
.
Checks if the document includes a value at path
.
Sets a value in this document. For !!set
, value
needs to be a
boolean to add/remove the item from the set.
Sets a value in this document. For !!set
, value
needs to be a
boolean to add/remove the item from the set.
Change the YAML version and schema used by the document.
A null
version disables support for directives, explicit tags, anchors, and aliases.
It also requires the schema
option to be given as a Schema
instance value.
Overrides all previously set schema options.
A JSON representation of the document contents
.
A YAML representation of the document.