(str: string)
| 72 | } |
| 73 | |
| 74 | export function stripTrailingAndCurly(str: string) { |
| 75 | // Remove trailing slashes |
| 76 | str = str.replace(/\/$/, ""); |
| 77 | |
| 78 | // Remove anything inside curly brackets |
| 79 | str = str.replace(/\/\{[^}]*}/, ""); |
| 80 | |
| 81 | return str; |
| 82 | } |
| 83 | |
| 84 | export function isAlphaNumericUnderscore(str: string): boolean { |
| 85 | let pattern = /^[a-z0-9_]+$/i; |
no outgoing calls
no test coverage detected