equals-ignore-case
Determine if two strings are equal, regardless of their case.
Usage
npm install @composite/equals-ignore-case --save # Install package via NPM
yarn add @composite/equals-ignore-case # Install package via Yarn
import { expect } from "chai";
import equalsIgnoreCase from "@composite/equals-ignore-case";
expect(equalsIgnoreCase("ABC", "Abc")).to.be.true;
expect(equalsIgnoreCase("Hello", "heLLO"))to.be.true;
expect(equalsIgnoreCase("Foo bar", "fOO BAr").to.be.true;
expect(equalsIgnoreCase(undefined, "Hi")).to.be.false;
expect(equalsIgnoreCase(undefined, "undefined")).to.be.false;
expect(equalsIgnoreCase(null, null).to.be.false;
expect(equalsIgnoreCase(1, "1")).to.be.false;
This package contains TypeScript type declarations.
Build & Test
This package uses Gulp for building, and Chai and Mocha for testing.
npm install # Installs dependencies.
npm run build # Build the project.
npm test # Run tests.
License
Refer to the LICENSE
file for license information.