# case-insensitive

> Wraps around an array or string and transforms certain methods into case-insensitive versions.

Latest version **1.0.0** (published 2017-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install case-insensitive
pnpm add case-insensitive
yarn add case-insensitive
bun add case-insensitive
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-02-26 |
| First published | 2017-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | John Lamansky |
| Maintainers | lamansky |
| Keywords | case, case insensitive, lowercase, string, array, endsWith, includes, indexOf, lastIndexOf, startsWith, wrapper |

## Links

- npm: https://www.npmjs.com/package/case-insensitive
- Repository: https://github.com/lamansky/case-insensitive
- Issues: https://github.com/lamansky/case-insensitive/issues
- npm.io page: https://npm.io/package/case-insensitive

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-02-26

## README

# case-insensitive

A [Node.js](https://nodejs.org/) module that wraps around an array or string and transforms certain methods into case-insensitive versions.

## Installation

```bash
npm install case-insensitive --save
```

The module exposes a single function.

## Usage

```javascript
const ci = require('case-insensitive')

ci('String').equals('STRING') // true
ci('String').startsWith('s') // true
ci('String').endsWith('nG') // true
ci('STRING').indexOf('t') // 1

ci(['Test']).equals(['test']) // true
ci(['A', 'B']).includes('A') // true
ci(['A', 'B']).indexOf('B') // 1
```

## Methods

The `ci()` function returns an object, with methods depending on the type of input:

| Method      | Arrays | Strings |
| ----------: | :----: | :-----: |
| endsWith    |        |    ✔    |
| equals      |   ✔    |    ✔    |
| includes    |   ✔    |    ✔    |
| indexOf     |   ✔    |    ✔    |
| lastIndexOf |   ✔    |    ✔    |
| startsWith  |        |    ✔    |

---
_Source: https://npm.io/package/case-insensitive · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
