Skip to main content

Variable: isNotEmpty

const isNotEmpty: Predicate<string | readonly unknown[] | Record<string, unknown>>

Defined in: predicate/comparison/index.ts:339

Creates a predicate that tests if a value is not empty.

The inverse of isEmpty.

Returns

A predicate that returns true if value is not empty

Example

import * as R from 'remeda'

R.filter(['', 'hello', '', 'world'], isNotEmpty) // => ['hello', 'world']

See

isEmpty - for the inverse