MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / escapeLikePattern

Function escapeLikePattern

server/src/db/slack-db.ts:12–14  ·  view source on GitHub ↗

* Escape LIKE pattern wildcards to prevent SQL injection

(str: string)

Source from the content-addressed store, hash-verified

10 * Escape LIKE pattern wildcards to prevent SQL injection
11 */
12function escapeLikePattern(str: string): string {
13 return str.replace(/[%_\\]/g, '\\$&');
14}
15
16/**
17 * Database operations for Slack user mappings

Callers 1

getAllMappingsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected