UNPKG

ts-data-forge

Version:

[![npm version](https://img.shields.io/npm/v/ts-data-forge.svg)](https://www.npmjs.com/package/ts-data-forge) [![npm downloads](https://img.shields.io/npm/dm/ts-data-forge.svg)](https://www.npmjs.com/package/ts-data-forge) [![License](https://img.shields.

21 lines 800 B
/** * Implements the logical implication (if-then) operator. * * Returns `true` if the antecedent is `false` or the consequent is `true`. In * logical terms: `antecedent → consequent` is equivalent to `¬antecedent ∨ * consequent`. * * **Truth table:** * * - `true → true` = `true` (valid implication) * - `true → false` = `false` (invalid implication) * - `false → true` = `true` (vacuously true) * - `false → false` = `true` (vacuously true) * * @param antecedent - The condition (if part) * @param consequent - The result that should hold if the condition is true * (then part) * @returns `true` if the implication holds, `false` otherwise */ export declare const ifThen: (antecedent: boolean, consequent: boolean) => boolean; //# sourceMappingURL=if-then.d.mts.map