implies
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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:

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)

Readme

Keywords

Package Sidebar

Install

npm i implies

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

20.5 kB

Total Files

15

Last publish

Collaborators

  • chronosis