Renamed nullable utils into isDefined and isUndefinedOrNull (#4402)
* Renamed nullable utils into isDefined and isUndefinedOrNull
This commit is contained in:
4
packages/twenty-front/src/utils/isDefined.ts
Normal file
4
packages/twenty-front/src/utils/isDefined.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { isNull, isUndefined } from '@sniptt/guards';
|
||||
|
||||
export const isDefined = <T>(value: T): value is NonNullable<T> =>
|
||||
!isUndefined(value) && !isNull(value);
|
||||
Reference in New Issue
Block a user