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

Latest commit

 

History

History
36 lines (29 loc) · 650 Bytes

index.md

File metadata and controls

36 lines (29 loc) · 650 Bytes

$all connection

Performs all passed operations like a reversed compose

Signature

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

subject (Object) - An object to operate on

TYPE SIGNATURES

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

EXAMPLE

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

//
// Awesomize the situation
//
$all(
    $toggle('allBugsFixed'),
    $add('itemsInTheFrige', 'beer'),
    myObject
);
// returns {
//     allBugsFixed: true,
//     itemsInTheFrige: ['eggs', 'milk', 'beer']
// }