MCPcopy Create free account
hub / github.com/aetherstate/GODMOD3.AI / shortHash

Function shortHash

functions/api/telemetry.ts:355–361  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

353}
354
355function shortHash(str: string): string {
356 let h = 0
357 for (let i = 0; i < str.length; i++) {
358 h = ((h << 5) - h + str.charCodeAt(i)) | 0
359 }
360 return Math.abs(h).toString(36).slice(0, 6)
361}
362
363function jsonResponse(data: unknown, status: number): Response {
364 return new Response(JSON.stringify(data), {

Callers 1

onRequestPostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected