MCPcopy Index your code
hub / github.com/developit/htm / stringValue

Function stringValue

packages/babel-plugin-htm/index.mjs:86–97  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

84 }
85
86 function stringValue(str) {
87 if (options.monomorphic) {
88 return t.objectExpression([
89 t.objectProperty(propertyName('type'), t.numericLiteral(3)),
90 t.objectProperty(propertyName('tag'), t.nullLiteral()),
91 t.objectProperty(propertyName('props'), t.nullLiteral()),
92 t.objectProperty(propertyName('children'), t.nullLiteral()),
93 t.objectProperty(propertyName('text'), t.stringLiteral(str))
94 ]);
95 }
96 return t.stringLiteral(str);
97 }
98
99 function createVNode(tag, props, children) {
100 // Never pass children=[[]].

Callers 1

transformFunction · 0.85

Calls 1

propertyNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…