1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-20 01:28:52 +09:00
MisskeyIO/packages/backend/src/misc/sql-like-escape.ts

4 lines
83 B
TypeScript
Raw Normal View History

export function sqlLikeEscape(s: string) {
return s.replace(/([%_])/g, '\\$1');
}