(str: string)
| 4 | |
| 5 | // Strip control characters while preserving valid Unicode characters. |
| 6 | export function sanitizeString(str: string) { |
| 7 | if (!str) return str; |
| 8 | // biome-ignore lint/suspicious: this is ok |
| 9 | return str.replace(/[\u0000-\u001F\u007F-\u009F]/g, ""); |
| 10 | } |
no test coverage detected