MCPcopy Create free account
hub / github.com/sindresorhus/execa / callBoundExeca

Function callBoundExeca

lib/methods/create.js:30–45  ·  view source on GitHub ↗
({mapArguments, deepOptions = {}, boundOptions = {}, setBoundExeca, createNested}, firstArgument, ...nextArguments)

Source from the content-addressed store, hash-verified

28};
29
30const callBoundExeca = ({mapArguments, deepOptions = {}, boundOptions = {}, setBoundExeca, createNested}, firstArgument, ...nextArguments) => {
31 if (isPlainObject(firstArgument)) {
32 return createNested(mapArguments, mergeOptions(boundOptions, firstArgument), setBoundExeca);
33 }
34
35 const {file, commandArguments, options, isSync} = parseArguments({
36 mapArguments,
37 firstArgument,
38 nextArguments,
39 deepOptions,
40 boundOptions,
41 });
42 return isSync
43 ? execaCoreSync(file, commandArguments, options)
44 : execaCoreAsync(file, commandArguments, options, createNested);
45};
46
47const parseArguments = ({mapArguments, firstArgument, nextArguments, deepOptions, boundOptions}) => {
48 const callArguments = isTemplateString(firstArgument)

Callers 1

boundExecaFunction · 0.85

Calls 5

mergeOptionsFunction · 0.90
execaCoreSyncFunction · 0.90
execaCoreAsyncFunction · 0.90
createNestedFunction · 0.85
parseArgumentsFunction · 0.85

Tested by

no test coverage detected