MCPcopy Create free account
hub / github.com/bytebase/bytebase / hashCode

Function hashCode

frontend/src/utils/string.ts:35–42  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

33 title.replace(UNICODE_WHITESPACE, "");
34
35export function hashCode(s: string): number {
36 let hash = 0;
37 for (let i = 0; i < s.length; i++) {
38 hash = (hash << 5) - hash + s.charCodeAt(i);
39 hash |= 0; // Convert to 32bit integer
40 }
41 return hash;
42}

Callers 2

TableNodeFunction · 0.90
keyOfFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected