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

Function convertPipeOptions

out/cli.cjs:13902–13917  ·  view source on GitHub ↗
(options, context)

Source from the content-addressed store, hash-verified

13900 return { preventCancel: Boolean(preventCancel) };
13901 }
13902 function convertPipeOptions(options, context) {
13903 assertDictionary(options, context);
13904 const preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort;
13905 const preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;
13906 const preventClose = options === null || options === void 0 ? void 0 : options.preventClose;
13907 const signal = options === null || options === void 0 ? void 0 : options.signal;
13908 if (signal !== void 0) {
13909 assertAbortSignal(signal, `${context} has member 'signal' that`);
13910 }
13911 return {
13912 preventAbort: Boolean(preventAbort),
13913 preventCancel: Boolean(preventCancel),
13914 preventClose: Boolean(preventClose),
13915 signal
13916 };
13917 }
13918 function assertAbortSignal(signal, context) {
13919 if (!isAbortSignal(signal)) {
13920 throw new TypeError(`${context} is not an AbortSignal.`);

Callers 2

pipeThroughMethod · 0.85
pipeToMethod · 0.85

Calls 2

assertDictionaryFunction · 0.85
assertAbortSignalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…