Logical gates defined as simple functions
Logical gates (AND, NAND, OR, NOR, XOR, XNOR, NOT) made available as functions for ease of use in functional programming styles. An example, reducing an array to a single boolean value:
var gates = ; true true true; // truetrue false true; // falsefalse false false; // false
Install
$ npm install [--save] logic-gates
Usage
The defined logical gate methods are fast, accurate, and work on any type of input.
var gates = ; gates; // falsegates; // truegatesnot; // true gates; // truegates; // falsegatesnot; // false gates; // truegates; // falsegatesnot; // false gates; // falsegates; // true