function isSome
isSome(thing: unknown): boolean

Returns true if the given value is not null or undefined.

Examples

Example 1

isSome(null); // false
isSome(undefined); // false
isSome(0); // true
isSome({}); // true

Parameters

thing: unknown

Return Type

boolean

Usage

import { isSome } from ".";