MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / hashFNV1a

Function hashFNV1a

packages/@stdlib/misc/src/hash.ts:1–11  ·  view source on GitHub ↗
(str: string, seed = 0x811c9dc5)

Source from the content-addressed store, hash-verified

1export function hashFNV1a(str: string, seed = 0x811c9dc5): number {
2 let hval = seed;
3
4 for (let i = 0, l = str.length; i < l; i++) {
5 hval ^= str.charCodeAt(i);
6 hval +=
7 (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24);
8 }
9
10 return hval >>> 0;
11}

Callers 2

setupMethod · 0.90
quasar.config.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected