MCPcopy Create free account
hub / github.com/TailGrids/tailgrids / buildUnionPattern

Function buildUnionPattern

apps/docs/src/components/code-block.tsx:38–41  ·  view source on GitHub ↗
(parts: string[] | undefined)

Source from the content-addressed store, hash-verified

36}
37
38function buildUnionPattern(parts: string[] | undefined): RegExp | null {
39 if (!parts || parts.length === 0) return null;
40 return new RegExp(`(${parts.map(escapeRegExp).join("|")})`, "g");
41}
42
43function isAstNode(x: unknown): x is rendererNode {
44 return typeof x === "object" && x !== null && "type" in (x as object);

Callers 1

CodeBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected