UNPKG

messageformat

Version:

Intl.MessageFormat / Unicode MessageFormat 2 parser, runtime and polyfill

7 lines (6 loc) 270 B
import { string } from "../functions/string.js"; import { MessageFunctionContext } from "./function-context.js"; export function resolveLiteral(ctx, lit) { const msgCtx = new MessageFunctionContext(ctx, `|${lit.value}|`); return string(msgCtx, {}, lit.value); }