MCPcopy Create free account
hub / github.com/EmNudge/watlings / hashCode

Function hashCode

web-build/src/progress.ts:50–55  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

48}
49
50export async function hashCode(code: string): Promise<string> {
51 const encoded = new TextEncoder().encode(code);
52 const buffer = await crypto.subtle.digest("SHA-256", encoded);
53
54 return Array.from(new Uint8Array(buffer), (b) => b.toString(16).padStart(2, "0")).join("");
55}
56
57export function saveDraft(
58 chapterId: string,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected