UNPKG

marko

Version:

UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.

16 lines (13 loc) 431 B
import { types as t } from "@marko/compiler"; import { normalizeTemplateString } from "@marko/compiler/babel-utils"; export default function write(strings, ...expressions) { const template = normalizeTemplateString(strings, ...expressions); if (template) { return t.expressionStatement( t.callExpression( t.memberExpression(t.identifier("out"), t.identifier("w")), [template], ), ); } }