how to make something case insensitive in js code example
Example 1: compare string camelcase and lowercase javascript
str.toUpperCase() === str || str.toLowerCase() === str;
Example 2: compare string camelcase and lowercase javascript
function sameCase(str) {
return /^[A-Z]+$/.test(str) || /^[a-z]+$/.test(str);
}