Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

higher-order-logical-operators

darArch27MIT1.0.2

Allows combination of lower order functions that evaluate to booleans. Extends Array prototype with 'one' function, which takes a callback and returns true if the callback returns true for one and only one member of the array.

Higher Order Functions, Logical Operators, Function Combination

readme

Higher Order Logical Operators

Package provides higher order functions allowing for combination of lower order boolean functions using logical operators: and, not, or, xor.

In order to provide xor the Javascript Array object prototype is extended with the one function.

Contents

Usage

and, not, or and xor are named exports in index.js file for this module. They can therefore be imported for use individually as follows:

  • ES5
    • var <function_name> = require('higher-order-logical-operators').<function_name>
  • ES6
    • import { <function_name> } from 'higher-order-logical-operators'