isNullOrEmptyString{

isNullOrEmptyString

Checks whether the given value is null, undefined or empty string.

Import

import { isNullOrEmptyString } from '@fullstacksjs/toolbox';

Signature

function isNullOrEmptyString(str: Nullable<string>): str is Nullable<''> {}

Examples

isNullOrEmptyString(null)      // true
isNullOrEmptyString(undefined) // true
isNullOrEmptyString('')        // true
isNullOrEmptyString('f')       // false