MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / getHash

Function getHash

plugins/src/preload/loader.ts:15–25  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

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, '/')

Callers 1

isDisabledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected