(str: string)
| 13 | } |
| 14 | |
| 15 | function getHash(str: string) { |
| 16 | const data = new TextEncoder().encode(str) |
| 17 | let hash = 0x811c9dc5 |
| 18 | |
| 19 | for (const byte of data) { |
| 20 | hash ^= byte |
| 21 | hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24) |
| 22 | } |
| 23 | |
| 24 | return hash >>> 0 |
| 25 | } |
| 26 | |
| 27 | function isDisabled(path: string) { |
| 28 | path = path.toLowerCase().replace(/\\/g, '/') |