MCPcopy Create free account
hub / github.com/observablehq/framework / getFileHash

Function getFileHash

src/javascript/module.ts:187–189  ·  view source on GitHub ↗
(root: string, path: string)

Source from the content-addressed store, hash-verified

185 * and return its hash instead.
186 */
187export function getFileHash(root: string, path: string): string {
188 return getFileInfo(root, path)?.hash ?? createHash("sha256").digest("hex");
189}
190
191/**
192 * Returns the information for the file at the specified path within the source

Callers 3

module-test.tsFile · 0.85
resolveStylesheetPathFunction · 0.85
getModuleHashInternalFunction · 0.85

Calls 1

getFileInfoFunction · 0.85

Tested by

no test coverage detected