MCPcopy Create free account
hub / github.com/donghaxkim/react-rewrite / getTextLikeNodeValue

Function getTextLikeNodeValue

packages/cli/src/batch-transform.ts:1157–1165  ·  view source on GitHub ↗
(node: any)

Source from the content-addressed store, hash-verified

1155}
1156
1157function getTextLikeNodeValue(node: any): string {
1158 if (!node) return "";
1159 if (node.type === "JSXText") return node.value ?? "";
1160 if (node.type === "JSXExpressionContainer") {
1161 const value = getLiteralAttributeValue(node.expression);
1162 return value ?? "";
1163 }
1164 return "";
1165}
1166
1167function getLeadingInlineSeparator(text: string): string {
1168 if (!text) return "";

Callers 1

Calls 1

getLiteralAttributeValueFunction · 0.85

Tested by

no test coverage detected