@composite/equals-ignore-case
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

equals-ignore-case

NPM NPM LICENSE

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.

Readme

Keywords

Package Sidebar

Install

npm i @composite/equals-ignore-case

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mgthomas99