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

Function mergeConfig

out/cli.cjs:73252–73328  ·  view source on GitHub ↗
(config1, config22)

Source from the content-addressed store, hash-verified

73250 },
73251 remove() {
73252 }
73253 }
73254);
73255
73256// node_modules/axios/lib/core/mergeConfig.js
73257var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
73258function mergeConfig(config1, config22) {
73259 config22 = config22 || {};
73260 const config8 = {};
73261 function getMergedValue(target, source, prop, caseless) {
73262 if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
73263 return utils_default.merge.call({ caseless }, target, source);
73264 } else if (utils_default.isPlainObject(source)) {
73265 return utils_default.merge({}, source);
73266 } else if (utils_default.isArray(source)) {
73267 return source.slice();
73268 }
73269 return source;
73270 }
73271 function mergeDeepProperties(a4, b7, prop, caseless) {
73272 if (!utils_default.isUndefined(b7)) {
73273 return getMergedValue(a4, b7, prop, caseless);
73274 } else if (!utils_default.isUndefined(a4)) {
73275 return getMergedValue(void 0, a4, prop, caseless);
73276 }
73277 }
73278 function valueFromConfig2(a4, b7) {
73279 if (!utils_default.isUndefined(b7)) {
73280 return getMergedValue(void 0, b7);
73281 }
73282 }
73283 function defaultToConfig2(a4, b7) {
73284 if (!utils_default.isUndefined(b7)) {
73285 return getMergedValue(void 0, b7);
73286 } else if (!utils_default.isUndefined(a4)) {
73287 return getMergedValue(void 0, a4);
73288 }
73289 }
73290 function mergeDirectKeys(a4, b7, prop) {
73291 if (prop in config22) {
73292 return getMergedValue(a4, b7);
73293 } else if (prop in config1) {
73294 return getMergedValue(void 0, a4);
73295 }
73296 }
73297 const mergeMap = {
73298 url: valueFromConfig2,
73299 method: valueFromConfig2,
73300 data: valueFromConfig2,
73301 baseURL: defaultToConfig2,
73302 transformRequest: defaultToConfig2,
73303 transformResponse: defaultToConfig2,
73304 paramsSerializer: defaultToConfig2,
73305 timeout: defaultToConfig2,
73306 timeoutMessage: defaultToConfig2,
73307 withCredentials: defaultToConfig2,
73308 withXSRFToken: defaultToConfig2,
73309 adapter: defaultToConfig2,

Callers 6

resolveConfig_defaultFunction · 0.85
_requestMethod · 0.85
getUriMethod · 0.85
cli.cjsFile · 0.85
generateHTTPMethodFunction · 0.85
createInstanceFunction · 0.85

Calls 5

mergeDeepPropertiesFunction · 0.85
headersToObjectFunction · 0.85
merge2Function · 0.85
forEachMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…