MCPcopy
hub / github.com/di-sukharev/opencommit / throwIfAborted

Function throwIfAborted

out/cli.cjs:48060–48073  ·  view source on GitHub ↗
(signal)

Source from the content-addressed store, hash-verified

48058 return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData";
48059 }
48060 function throwIfAborted(signal) {
48061 if (!signal) {
48062 return;
48063 }
48064 if (typeof signal.throwIfAborted === "function") {
48065 signal.throwIfAborted();
48066 } else {
48067 if (signal.aborted) {
48068 const err = new Error("The operation was aborted");
48069 err.name = "AbortError";
48070 throw err;
48071 }
48072 }
48073 }
48074 function addAbortListener(signal, listener) {
48075 if ("addEventListener" in signal) {
48076 signal.addEventListener("abort", listener, { once: true });

Callers 2

formDataFunction · 0.85
specConsumeBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…