(text: string)
| 27 | } |
| 28 | |
| 29 | export function escapeForSVG(text: string): string { |
| 30 | return text |
| 31 | .replace(/&/g, "&") // must be first |
| 32 | .replace(/</g, "<") |
| 33 | .replace(/>/g, ">") |
| 34 | .replace(/"/g, """) |
| 35 | .replace(/'/g, "'") |
| 36 | .replace(/\n/g, "\\n") // newlines |
| 37 | .replace(/\t/g, "\\t") // tabs |
| 38 | .replace(/\r/g, "\\r"); // carriage returns |
| 39 | } |
| 40 | |
| 41 | export function kebabOfStr(str: string): string { |
| 42 | return str |
no test coverage detected