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

Function escapeRegExp

apps/docs/src/components/code-block.tsx:34–36  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

32}
33
34function escapeRegExp(str: string): string {
35 return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
36}
37
38function buildUnionPattern(parts: string[] | undefined): RegExp | null {
39 if (!parts || parts.length === 0) return null;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected