antsibull-docs
Version:
TypeScript library for processing Ansible documentation markup
21 lines • 796 B
JavaScript
;
/*
Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)
SPDX-FileCopyrightText: Ansible Project
SPDX-License-Identifier: BSD-2-Clause
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeOpts = mergeOpts;
function mergeOpts(options, fallback) {
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
const result = Object.assign({}, fallback, options);
// In case options.formatXXX is explicitly set to undefined:
for (const key of Object.keys(fallback)) {
if (!result[key]) {
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
result[key] = fallback[key];
}
}
return result;
}
//# sourceMappingURL=opts.js.map