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

Function createExeca

lib/methods/create.js:13–28  ·  view source on GitHub ↗
(mapArguments, boundOptions, deepOptions, setBoundExeca)

Source from the content-addressed store, hash-verified

11// - optional argument/options: execa(file), execa(file, args), execa(file, options), execa(file, args, options)
12// `mapArguments()` and `setBoundExeca()` allows for method-specific logic.
13export const createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
14 const createNested = (mapArguments, boundOptions, setBoundExeca) => createExeca(mapArguments, boundOptions, deepOptions, setBoundExeca);
15 const boundExeca = (...execaArguments) => callBoundExeca({
16 mapArguments,
17 deepOptions,
18 boundOptions,
19 setBoundExeca,
20 createNested,
21 }, ...execaArguments);
22
23 if (setBoundExeca !== undefined) {
24 setBoundExeca(boundExeca, createNested, boundOptions);
25 }
26
27 return boundExeca;
28};
29
30const callBoundExeca = ({mapArguments, deepOptions = {}, boundOptions = {}, setBoundExeca, createNested}, firstArgument, ...nextArguments) => {
31 if (isPlainObject(firstArgument)) {

Callers 2

index.jsFile · 0.90
createNestedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected