0.0.1 • Published 2 years ago

@gmjs/nullish-checks v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Nullish checks

Guard functions for checking nullish/non-nullish values.

Installation

npm install --save @gmjs/nullish-checks

Usage

function isNullish<T>(value: T): value is T extends null | undefined ? T : never;

function isNotNullish<T>(value: T): value is T extends null | undefined ? never : T;
0.0.1

2 years ago