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

Function isTextLikeChild

packages/cli/src/transform.ts:888–890  ·  view source on GitHub ↗
(child: any)

Source from the content-addressed store, hash-verified

886}
887
888function isTextLikeChild(child: any): boolean {
889 return child.type === "JSXText" || (child.type === "JSXExpressionContainer" && child.expression?.type === "StringLiteral");
890}
891
892function isEmptyTextLikeChild(child: any): boolean {
893 if (child.type === "JSXText") return child.value === "";

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected