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