Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/aether/deps.ts>YAML.parse

A Deno library to interface with the Discord API
Latest
function YAML.parse
import { YAML } from "https://deno.land/x/aether@v0.0.3/deps.ts";
const { parse } = YAML;

Parse an input string into JavaScript.

Only supports input consisting of a single YAML document; for multi-document support you should use YAML.parseAllDocuments. May throw on error, and may log warnings using console.warn.

Parameters

src: string
  • A string with YAML formatting.
  • A reviver function, as in JSON.parse()

Returns

any

The value will match the type of the root value of the parsed YAML document, so Maps become objects, Sequences arrays, and scalars result in nulls, booleans, numbers and strings.

Parameters

src: string
reviver: Reviver