1.0.0 • Published 3 years ago
null-not-null v1.0.0
This package provides operations to handle null and undefined values.
Functions
isNull(obj)
- returnstrue
when type ofobj
isundefined
orobj
equals tonull
; otherwisefalse
notNull(obj)
- an equivalent of!isNull(obj)
; use only in filter-like functionsisUndefined(obj)
- returnstrue
when type ofobj
isundefined
; otherwisefalse
notUndefined(obj)
- an equivalent of!isUndefined(obj)
; use only in filter-like functions
Types
Nullable<T>
- an equivalent ofT | null | undefined
NotNull
- an union of all primitive types besidesnull
andundefined
ExcludeNull<T>
- an equivalent ofExclude<T, null | undefined>
IncludesNull<T>
- equals totrue
whennull
orundefined
extendsT
; otherwisefalse
1.0.0
3 years ago