everyutil
Version:
A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.
12 lines (11 loc) • 392 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.booleanTieBreaker = void 0;
/**
* Resolves tie between two flags based on backup input.
* @author @dailker
*/
function booleanTieBreaker(primary, secondary, backup) {
return primary === secondary ? backup : (primary ? primary : secondary);
}
exports.booleanTieBreaker = booleanTieBreaker;