MCPcopy Index your code
hub / github.com/darkreader/darkreader / calculateHashesForFile

Function calculateHashesForFile

tasks/bundle-signature.js:70–79  ·  view source on GitHub ↗
(hashes, realPath, isOptional = false)

Source from the content-addressed store, hash-verified

68}
69
70async function calculateHashesForFile(hashes, realPath, isOptional = false) {
71 try {
72 const data = await readFile(realPath, null);
73 return calculateHashForData(hashes, data);
74 } catch (e) {
75 if (!isOptional) {
76 throw e;
77 }
78 }
79}
80
81function hashTypes(signatureVersion) {
82 if (signatureVersion === 0) {

Callers 2

calculateHashesFunction · 0.85
createHashesFunction · 0.85

Calls 2

readFileFunction · 0.85
calculateHashForDataFunction · 0.85

Tested by

no test coverage detected