MCPcopy Index your code
hub / github.com/prettydiff/prettydiff / hashComplete

Function hashComplete

services.ts:2306–2321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2304 listObject:any = {},
2305 hashes:string[] = [],
2306 hashComplete = function node_apps_hash_dirComplete_hashComplete():void {
2307 const hash:Hash = node.crypto.createHash("sha512");
2308 let hashstring:string = "";
2309 if (verbose === true) {
2310 console.log(`${apps.humantime(false)}File hashing complete. Working on a final hash to represent the directory structure.`);
2311 }
2312 hash.update(hashes.join(""));
2313 hashstring = (hashlist === true)
2314 ? JSON.stringify(listObject)
2315 : hash.digest("hex").replace(/\s+$/, "");
2316 if (verbose === true) {
2317 apps.log([`Pretty Diff hashed ${text.cyan + filepath + text.none}`], hashstring, filepath);
2318 }else{
2319 apps.log([""], hashstring, filepath);
2320 }
2321 },
2322 hashback = function node_apps_hash_dirComplete_hashback(data:readFile, item:string|Buffer, callback:Function):void {
2323 const hash:Hash = node.crypto.createHash("sha512");
2324 hash.on("readable", function node_apps_hash_dirComplete_hashback_hash():void {

Callers 2

terminateFunction · 0.85
dirCompleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected