Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/codecombat/codecombat
/ hashString
Function
hashString
app/views/artisans/BlockTestingView.js:363–366 ·
view source on GitHub ↗
(str)
Source
from the content-addressed store, hash-verified
361
})())
362
363
function
hashString (str) {
364
// djb2 algorithm; hash * 33 + c
365
return
Array.from(str).reduce((hash, char) => ((hash << 5) + hash) + char.charCodeAt(0), 5381)
366
}
Callers
3
addTestCases
Method · 0.70
addBlockly
Method · 0.70
onAceChange
Method · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected