(text: string)
| 76 | } |
| 77 | |
| 78 | export function getHashCode(text: string): number { |
| 79 | const len = text.length; |
| 80 | let hash = 0; |
| 81 | for (let i = 0; i < len; i++) { |
| 82 | const c = text.charCodeAt(i); |
| 83 | hash = ((hash << 5) - hash + c) & 4294967295; |
| 84 | } |
| 85 | return hash; |
| 86 | } |
| 87 | |
| 88 | export function escapeRegExpSpecialChars(input: string): string { |
| 89 | return input.replaceAll(/[\^$.*+?\(\)\[\]{}|\-\\]/g, '\\$&'); |
no outgoing calls
no test coverage detected