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

Function removeFromStr

packages/cli/src/batch-transform.ts:896–897  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

894 const val = classNameAttr.value;
895
896 const removeFromStr = (s: string) =>
897 s.split(/\s+/).filter((c: string) => c && !pattern.test(c)).join(" ");
898
899 if (val.type === "StringLiteral" || val.type === "Literal") {
900 val.value = removeFromStr(val.value);

Callers 1

removeClassByPatternFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected