effect-io-ai

Package: effect
Module: Predicate

Predicate.isNullish

Checks whether a value is null or undefined.

When to use

Use when you need a Predicate guard for nullish values.

Details

Uses input === null || input === undefined.

Example (Guarding nullish values)

import { Predicate } from "effect"

const values = [0, null, "", undefined]
const nullish = values.filter(Predicate.isNullish)

console.log(nullish)

See

Signature

declare const isNullish: <A>(input: A) => input is A & (null | undefined)

Source

Since v4.0.0