UNPKG

marko

Version:

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

15 lines (13 loc) 548 B
"use strict";exports.__esModule = true;exports.default = write;var _compiler = require("@marko/compiler"); var _babelUtils = require("@marko/compiler/babel-utils"); function write(strings, ...expressions) { const template = (0, _babelUtils.normalizeTemplateString)(strings, ...expressions); if (template) { return _compiler.types.expressionStatement( _compiler.types.callExpression( _compiler.types.memberExpression(_compiler.types.identifier("out"), _compiler.types.identifier("w")), [template] ) ); } }