@toreda/build-tools
Version:

18 lines (17 loc) • 489 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.configValue = void 0;
function configValue(key, fallback, args, options) {
if (typeof key !== 'string' || !key) {
return fallback;
}
const type = typeof fallback;
if (args && typeof args[key] === type) {
return args[key];
}
if (options && typeof options[key] === type) {
return options[key];
}
return fallback;
}
exports.configValue = configValue;