Negated version of isEmpty. nonEmpty(x) is the same as !isEmpty(x). It can be useful when composing functions (e.g. via pipe).
nonEmpty(x)
!isEmpty(x)
nonEmpty(opt(2)) // truenonEmpty([]) // falseconst inc = (x: number) => x + 1;pipe( a, // Some(4) map(inc), // Some(5) nonEmpty, // true) // true Copy
nonEmpty(opt(2)) // truenonEmpty([]) // falseconst inc = (x: number) => x + 1;pipe( a, // Some(4) map(inc), // Some(5) nonEmpty, // true) // true
isEmpty
Generated using TypeDoc
Negated version of isEmpty.
nonEmpty(x)
is the same as!isEmpty(x)
. It can be useful when composing functions (e.g. via pipe).