not

not :: Function → a → Boolean

Takes a function ff , and returns a new one receiving a value valval and returning the opposite of what f(val)f(val) would have returned.

It is largely used within the library itself.

contains.js
/* Part of the contains validator */


const contains = (value) => compose(
  when(isString, (string) => string.includes(value)),
  when(Array.isArray, arrayContains(value)),
  when(not(or(isString, Array.isArray)), stubFalse),
);
composewhenor

Last updated