function isEqualIgnoreCase
isEqualIgnoreCase(
thing1: unknown,
thing2: unknown,
): boolean

Compares two things by turning them into strings and lowercasing them, and comparing the string values. Works exactly like isEqual except will lowercase both things before comparing.

Examples

Example 1

isEqualIgnoreCase("1", 1); // true
isEqualIgnoreCase({foo: "bar"}, {foo: "bar"}); // true
isEqualIgnoreCase([], []); // true
isEqualIgnoreCase([0], [1]); // false
isEqualIgnoreCase(false, " false "); // false
isEqualIgnoreCase(false, "FALSE"); // true

Parameters

thing1: unknown
thing2: unknown

Return Type

boolean

Usage

import { isEqualIgnoreCase } from ".";