Lowdefy
v3.23.3/Operators/_yaml/

_yaml

The _yaml parses and writes YAML strings.

Operator methods:

_yaml.parse

(value: string): any

The _yaml.parse method parses a YAML string into an object.

Arguments

string

The string to parse.

Examples

Parse a YAML string:
_yaml.parse: |
  key: Value
  boolean: true
  array:
    - 1
    - 2

Returns:

key: Value
boolean: true
array:
  - 1
  - 2

_yaml.stringify

({on: any, options?: object}): string
([on: any, options?: object]): string

The _yaml.stringify method creates a YAML string from an object.

Arguments

object
  • on: any: The object to stringify.
  • options: object: Optional settings. See the YAML.dump method here for supported settings.

Examples

Stringify an object as YAML:
_yaml.stringify:
  key: Value
  boolean: true
  array:
    - 1
    - 2

Returns (as a string):

key: Value
boolean: true
array:
  - 1
  - 2