MCPcopy Create free account
hub / github.com/arktypeio/arktype / hashOf

Function hashOf

ark/aot/nextProgram.ts:88–89  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

86}
87
88const hashOf = (text: string) =>
89 createHash("sha256").update(text).digest("hex").slice(0, 24)
90
91export const answerFileOf = (dir: string, id: string): string =>
92 join(dir, `${hashOf(id)}.json`)

Callers 4

answerFileOfFunction · 0.70
programDirOfFunction · 0.70
readAndWriteFunction · 0.70
isSourceReadFunction · 0.70

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected