Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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 */
5
export
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
makeShardId
Function · 0.85
getShardId
Function · 0.85
Calls
1
hashOptimize
Function · 0.85
Tested by
no test coverage detected