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

Function hashback

services.ts:2322–2339  ·  view source on GitHub ↗
(data:readFile, item:string|Buffer, callback:Function)

Source from the content-addressed store, hash-verified

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 {
2325 let hashstring:string = "";
2326 const hashdata:Buffer = <Buffer>hash.read();
2327 if (hashdata !== null) {
2328 hashstring = hashdata.toString("hex").replace(/\s+/g, "");
2329 callback(hashstring, data.index);
2330 }
2331 });
2332 hash.write(item);
2333 hash.end();
2334 if (http.test(filepath) === true) {
2335 apps.remove(data.path, function node_apps_hash_dirComplete_hashback_hash_remove():boolean {
2336 return true;
2337 });
2338 }
2339 },
2340 typeHash = function node_apps_hash_dirComplete_typeHash(index:number, end:number) {
2341 const terminate = function node_apps_hash_dirComplete_typeHash_terminate():void {
2342 c = c + 1;

Callers 2

typeHashFunction · 0.85
dirCompleteFunction · 0.85

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected