1.0.1 • Published 9 years ago

fj-and v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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