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) • 341 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.booleanConsensus = void 0;
/**
* Returns true if all flags agree (all true or all false).
* @author @dailker
*/
function booleanConsensus(...flags) {
return flags.every(f => f === flags[0]);
}
exports.booleanConsensus = booleanConsensus;