1.0.3 • Published 4 years ago
implies v1.0.3
implies
Provides convenient operations for Boolean logical and Bitwise "Implies" operators
Installation
npm install impliesUsage
const { implies, bitwiseImplies } = require('implies');
console.log(implies(true, true)); // true
console.log(implies(true, false)); // false
console.log(implies(false, true)); // true
console.log(implies(false, false)); // trueAPI Reference
_.implies(a, b) ⟾ boolean
Test the logic imply operation a => b, providing the following truth table:
| A | B | Result |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
_.bitwiseImplies(a, b, radix=10) ⟾ string
Performs a bitwise implies operation between a => b treating the passed values as 64-bit integers and returning a numeric string of the given radix/base (defaulting to base-10)
