MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / escapeRegex

Function escapeRegex

apps/desktop/src/main/vault.ts:1612–1614  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

1610}
1611
1612function escapeRegex(value: string): string {
1613 return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
1614}
1615
1616function scoreMatch(query: string, text: string): number {
1617 if (!query) return 1

Callers 1

scoreMatchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected