MCPcopy 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
363function 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

addTestCasesMethod · 0.70
addBlocklyMethod · 0.70
onAceChangeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected