implies
v1.0.3
Published
Boolean logical and Bitwise "Implies" operators
Downloads
8
Readme
implies
Provides convenient operations for Boolean logical and Bitwise "Implies" operators
Installation
npm install implies
Usage
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)); // true
API 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)