MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / cancelAlgorithm

Function cancelAlgorithm

out/cli.cjs:13802–13826  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

13800 });
13801 }
13802 function cancelAlgorithm(reason) {
13803 const iterator2 = iteratorRecord.iterator;
13804 let returnMethod;
13805 try {
13806 returnMethod = GetMethod(iterator2, "return");
13807 } catch (e3) {
13808 return promiseRejectedWith(e3);
13809 }
13810 if (returnMethod === void 0) {
13811 return promiseResolvedWith(void 0);
13812 }
13813 let returnResult;
13814 try {
13815 returnResult = reflectCall(returnMethod, iterator2, [reason]);
13816 } catch (e3) {
13817 return promiseRejectedWith(e3);
13818 }
13819 const returnPromise = promiseResolvedWith(returnResult);
13820 return transformPromiseWith(returnPromise, (iterResult) => {
13821 if (!typeIsObject(iterResult)) {
13822 throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object");
13823 }
13824 return void 0;
13825 });
13826 }
13827 stream4 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, 0);
13828 return stream4;
13829 }

Callers 1

cancelFunction · 0.85

Calls 9

GetMethodFunction · 0.85
promiseRejectedWithFunction · 0.85
promiseResolvedWithFunction · 0.85
reflectCallFunction · 0.85
transformPromiseWithFunction · 0.85
typeIsObjectFunction · 0.85
cancelMethod · 0.45
abortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…