MCPcopy Create free account
hub / github.com/npmx-dev/npmx.dev / escapeRegExp

Function escapeRegExp

shared/utils/dev-dependency.ts:62–64  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

60}
61
62function escapeRegExp(text: string): string {
63 return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
64}
65
66function hasReadmeDevInstallHint(packageName: string, readmeContent?: string | null): boolean {
67 if (!readmeContent) return false

Callers 1

hasReadmeDevInstallHintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected