MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / escapeLike

Function escapeLike

apps/cloud/src/auth/member-directory.ts:37–37  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

35// Escape LIKE wildcards in a user-typed search term so `_` and `%` match
36// themselves. Same treatment `org-deletion.ts` gives an org id prefix.
37const escapeLike = (value: string): string => value.replace(/[\\%_]/g, "\\$&");
38
39// The display name the seam reports: first + last, or nothing. Computed in SQL
40// too (below) so the search term matches what the caller sees.

Callers 1

membersFunction · 0.70

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected