Function nonEmpty

  • Negated version of isEmpty. nonEmpty(x) is the same as !isEmpty(x). It can be useful when composing functions (e.g. via pipe).

    Parameters

    Returns boolean

    Example

    nonEmpty(opt(2)) // true
    nonEmpty([]) // false

    const inc = (x: number) => x + 1;
    pipe(
    a, // Some(4)
    map(inc), // Some(5)
    nonEmpty, // true
    ) // true

    See

    isEmpty

Generated using TypeDoc