Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/aether/deps.ts>YAML.Composer

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

Compose a stream of CST nodes into a stream of YAML Documents.

import { Composer, Parser } from 'yaml'

const src: string = ...
const tokens = new Parser().parse(src)
const docs = new Composer().compose(tokens)

Properties

private
atDirectives
private
decorate
private
directives
private
doc
private
errors
private
onError
private
options
private
prelude
private
warnings

Methods

compose(
tokens: Iterable<Token>,
forceDoc?: boolean,
endOffset?: number,
): Generator<Document.Parsed<import("../nodes/Node.d.ts").ParsedNode>, void, unknown>

Compose tokens into documents.

end(forceDoc?: boolean, endOffset?: number): Generator<Document.Parsed<import("../nodes/Node.d.ts").ParsedNode>, void, unknown>

Call at end of input to yield any remaining document.

next(token: Token): Generator<Document.Parsed<import("../nodes/Node.d.ts").ParsedNode>, void, unknown>

Advance the composer by one CST token.

streamInfo(): { comment: string; directives: Directives; errors: YAMLParseError[]; warnings: YAMLWarning[]; }

Current stream status information.

Mostly useful at the end of input for an empty stream.