earljs
Version:
Ergonomic, modern and type-safe assertion library
17 lines (16 loc) • 496 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getOptionsWith = void 0;
function getOptionsWith(options, updates) {
let hasModifications = false;
for (const key of Object.keys(updates)) {
if (options[key] !== updates[key]) {
hasModifications = true;
}
}
if (hasModifications) {
return Object.assign(Object.assign({}, options), updates);
}
return options;
}
exports.getOptionsWith = getOptionsWith;
;