MCPcopy Index your code
hub / github.com/angular/angular / hash

Method hash

packages/service-worker/cli/filesystem.ts:42–46  ·  view source on GitHub ↗
(_path: string)

Source from the content-addressed store, hash-verified

40 }
41
42 async hash(_path: string): Promise<string> {
43 const file = this.canonical(_path);
44 const contents: Buffer = fs.readFileSync(file);
45 return sha1Binary(contents as any as ArrayBuffer);
46 }
47
48 async write(_path: string, contents: string): Promise<void> {
49 const file = this.canonical(_path);

Callers

nothing calls this directly

Calls 2

canonicalMethod · 0.95
sha1BinaryFunction · 0.90

Tested by

no test coverage detected