UNPKG

yaml-unist-parser

Version:

A YAML parser that produces output compatible with unist

13 lines (11 loc) 563 B
import { transformAstQuoteValue } from "./quote-value.mjs"; import { createQuoteSingle } from "../factories/quote-single.mjs"; //#region src/transforms/quote-single.ts function transformQuoteSingle(quoteSingle, context, props) { const srcToken = quoteSingle.srcToken; // istanbul ignore if -- @preserve if (!srcToken || srcToken.type !== "single-quoted-scalar") throw new Error("Expected single-quoted scalar srcToken"); return createQuoteSingle(transformAstQuoteValue(quoteSingle, srcToken, context, props)); } //#endregion export { transformQuoteSingle };