MCPcopy Create free account
hub / github.com/developit/htm / escapeText

Function escapeText

packages/babel-plugin-transform-jsx-to-htm/index.mjs:63–68  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

61 }
62
63 function escapeText(text) {
64 if (text.indexOf('<') < 0) {
65 return raw(text);
66 }
67 return expr(t.stringLiteral(text));
68 }
69
70 function escapePropValue(node) {
71 const value = node.value;

Callers 1

processChildrenFunction · 0.85

Calls 2

rawFunction · 0.85
exprFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…