import { Composer } from "https://deno.land/x/windmill@v1.317.1/node_modules/yaml/browser/dist/index.js";
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)
Methods
compose()
tokens,
forceDoc?,
endOffset?,
Compose tokens into documents.
decorate(doc, afterDoc)
end(forceDoc?, endOffset?)
Call at end of input to yield any remaining document.
next(token)
Advance the composer by one CST token.
Current stream status information.
Mostly useful at the end of input for an empty stream.