MCPcopy Create free account
hub / github.com/kpdecker/jsdiff / processIndex

Function processIndex

src/patch/apply.ts:344–364  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

342
343 let currentIndex = 0;
344 function processIndex(): void {
345 const index = spDiff[currentIndex++];
346 if (!index) {
347 return options.complete();
348 }
349
350 options.loadFile(index, function(err: any, data: string) {
351 if (err) {
352 return options.complete(err);
353 }
354
355 const updatedContent = applyPatch(data, index, options);
356 options.patched(index, updatedContent, function(err: any) {
357 if (err) {
358 return options.complete(err);
359 }
360
361 processIndex();
362 });
363 });
364 }
365 processIndex();
366}

Callers 1

applyPatchesFunction · 0.85

Calls 1

applyPatchFunction · 0.85

Tested by

no test coverage detected