Type guard check if the given value is not null or undefined.
The type of the value
The value to check
True if the value is neither null nor undefined, otherwise false
const data = ['demo', null, undefined, 'demo'];const output: string[] = data.filter(isNotNullish); Copy
const data = ['demo', null, undefined, 'demo'];const output: string[] = data.filter(isNotNullish);
v0.4.0
Type guard check if the given value is not null or undefined.