isNullOrUndefined(Object), isNull(Object) in the Util Module is deprecated in Angular 9. Alternative for isNullOrUndefined

 

Util module depreacted in angular. Here we are going to see the alternative for isNullOrUndefine, isNull, isUndefined.


import { isUndefined, isNull, isNullOrUndefined } from 'util';

Alternative for util Modules:
export function isNullOrUndefined<T>(obj: T | null | undefined): obj is null | undefined {
    return typeof obj === 'undefined' || obj === null;
}

Comments

Popular posts from this blog

SonarQube With Angular 19 on Windows: A Complete Setup and Integration Guide

Create emulator in Linux Virtual machine through terminal using docker for android

🔐 How to Use OWASP Dependency-Check for Android and iOS Projects