npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

fj-and

1.0.1

@schtoeffel

npmHomeRepoSnykSocket
Downloads:0
$ npm install fj-and
DailyWeeklyMonthlyYearly

fj-and

Build Status npm version

x && y

Installation

npm install fj-and --save

Usage

var and = require('fj-and');

let T = () => true;
let F = () => false;

and(T, T)()); // => true
and(T)(T)()); // => true
and(T, F)()); // => false
and(F, F)()); // => false
and(F, F)()); // => false

API

and

and(p1, p2)

Parameters

NameTypeDescription
p1functionA function that returns true or false
p2functionA function that returns true or false

Returns

TypeDescription
functionReturns a function which returns true if p1 and p2 return true