MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / hashString

Function hashString

source code/utils/imageResizer.ts:132–138  ·  view source on GitHub ↗

* Computes a simple numeric hash of a string for analytics grouping. * Uses djb2 algorithm, returning a 32-bit unsigned integer.

(str: string)

Source from the content-addressed store, hash-verified

130 * Uses djb2 algorithm, returning a 32-bit unsigned integer.
131 */
132function hashString(str: string): number {
133 let hash = 5381
134 for (let i = 0; i < str.length; i++) {
135 hash = ((hash << 5) + hash + str.charCodeAt(i)) | 0
136 }
137 return hash >>> 0
138}
139
140export type ImageDimensions = {
141 originalWidth?: number

Callers 2

compressImageBufferFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected