Index

Variables

Functions

Variables

Given a property name and a value, returns a function that returns a boolean based on whether
the passed object has a property that matches the value
let obj = { foo: 1, name: "blarg" };
let getName = propEq("name", "blarg");
getName(obj) === true

Given a property name and a value, returns a function that returns a boolean based on whether
the passed object has a property that matches the value
let obj = { foo: 1, name: "blarg" };
let getName = propEq("name", "blarg");
getName(obj) === true

Given a function with N parameters, returns a new function that supports partial application.
The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,
where M is less than N, it returns a new function that accepts the remaining parameters. It continues to
accept more parameters until all N parameters have been supplied.

This contrived example uses a partially applied function as an predicate, which returns true
if an object is found in both arrays.

This is a conditional construct which allows a series of predicates and output functions
to be checked and then applied. Each predicate receives the input. If the predicate
returns truthy, then its matching output function (mapping function) is provided with
the input and, then the result is returned.

Each combination (2-tuple) of predicate + output function should be placed in an array
of size 2: [ predicate, mapFn ]