Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/aws_s3/node_modules/cosmiconfig/dist/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeAll = exports.hasOwn = void 0;
/* eslint-disable @typescript-eslint/unbound-method */
exports.hasOwn = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
const objToString = Function.prototype.call.bind(Object.prototype.toString);
/* eslint-enable @typescript-eslint/unbound-method */
function isPlainObject(obj) {
return objToString(obj) === '[object Object]';
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function merge(target, source, options) {
for (const key of Object.keys(source)) {
const newValue = source[key];
if ((0, exports.hasOwn)(target, key)) {
if (Array.isArray(target[key]) && Array.isArray(newValue)) {
if (options.mergeArrays) {
target[key].push(...newValue);
continue;
}
}
else if (isPlainObject(target[key]) && isPlainObject(newValue)) {
target[key] = merge(target[key], newValue, options);
continue;
}
}
target[key] = newValue;
}
return target;
}
/**
* Merges multiple objects. Doesn't care about cloning non-primitives, as we load all these objects fresh from a file.
*/
function mergeAll(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
objects, options) {
return objects.reduce((target, source) => merge(target, source, options), {});
}
exports.mergeAll = mergeAll;
//# sourceMappingURL=merge.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0046 ]-- |