1.0.3 • Published 3 years ago

implies v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

implies

NPM

Actual version published on npm Master build Total npm module downloads Codacy Badge Codacy Coverage Badge Dependencies badge

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:

ABResult
TTT
TFF
FTT
FFT

_.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)