0.0.5 • Published 6 years ago

ts-null-or-undefined v0.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

ts-null-or-undefined

Best way to check for null or undefined in typescript using a type guard. Can strip out null or undefine or complex types like T | null etc.

To use:

import Type from "ts-null-or-undefined";

let a: number | null = 0;

console.log(a*4); //Error: a might be null

if(!Type.isNullOrUndefined(a)){
    console.log(a*4); //Works
}
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago