Skip to content

not

not<A>(p): Predicate<A>

Defined in: Core/Predicate.ts:44

Negates a predicate: the result passes exactly when the original fails.

A

Predicate<A>

Predicate<A>

const isBlank: Predicate<string> = s => s.trim().length === 0;
const isNotBlank = Predicate.not(isBlank);

isNotBlank("hello");  // true
isNotBlank("   ");    // false