Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Latest commit

 

History

History
32 lines (25 loc) · 596 Bytes

index.md

File metadata and controls

32 lines (25 loc) · 596 Bytes

$and projection

Performs all passed operations until one of them returns false

Signature

statements (...Function) - Multiple functions that take subject as their first and only argument

subject (Object) - The object that contains the requested values

TYPE SIGNATURES

...Function -> Object -> *
(...Function, Object) -> *

EXAMPLE

const myObject = {
	allBugsFixed: false,
    itemsInTheFrige: ['eggs', 'beer', 'milk']
};

//
// Happy?
//
$and(
    $get('allBugsFixed'),
    $contains('beer', 'itemsInTheFrige'),
    myObject
); // returns false