Check out example codes for "equalsignorecase typescript". It will help you in understanding the concepts better.

Code Example 1

var name1 = "Taylor Johnson";
var name2 ="taylor johnson";

//convert to lowercase for case insensitive comparison
if(name1.toLowerCase() === name2.toLowerCase()){
    //names are the same

Code Example 2

const str1 = '[email protected]';
const str2 = '[email protected]';

str1 === str2; // false
str1.toLowerCase() === str2.toLowerCase(); // true

Learn ReactJs, React Native from