MCPcopy Index your code
hub / github.com/deepnote/deepnote / computeContentHash

Function computeContentHash

packages/convert/src/snapshot/hash.ts:10–13  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

8 * @returns Hash string in format 'sha256:{hex}'
9 */
10export function computeContentHash(content: string): string {
11 const hash = createHash('sha256').update(content, 'utf-8').digest('hex')
12 return `sha256:${hash}`
13}
14
15/**
16 * Computes a snapshot hash from the file's key properties.

Callers 2

hash.test.tsFile · 0.90
addContentHashesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected