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

Function escapeLikePattern

server/src/db/member-db.ts:17–19  ·  view source on GitHub ↗

* Escape LIKE pattern wildcards to prevent SQL injection

(str: string)

Source from the content-addressed store, hash-verified

15 * Escape LIKE pattern wildcards to prevent SQL injection
16 */
17function escapeLikePattern(str: string): string {
18 return str.replace(/[%_\\]/g, '\\$&');
19}
20
21/**
22 * Normalize a raw agent object from JSONB to the current schema.

Callers 1

listProfilesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected