MCPcopy Create free account
hub / github.com/Effect-TS/effect / hashString

Function hashString

packages/cluster/src/internal/hash.ts:5–11  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

3
4/** @internal */
5export const hashString = (str: string) => {
6 let h = 5381, i = str.length
7 while (i) {
8 h = (h * 33) ^ str.charCodeAt(--i)
9 }
10 return hashOptimize(h)
11}

Callers 2

makeShardIdFunction · 0.85
getShardIdFunction · 0.85

Calls 1

hashOptimizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…