(input: string)
| 18 | |
| 19 | |
| 20 | export function filenameSafe(input: string) { |
| 21 | return input.replace(/[^a-z0-9]+/gi, "_").replace(/_{2,}/g, "_").replace(/_$/g, "").toLowerCase(); |
| 22 | } |
| 23 | |
| 24 | export function escapeRegExp(input: string): string { |
| 25 | return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string |
no outgoing calls
no test coverage detected