case-insensitive
A Node.js module that wraps around an array or string and transforms certain methods into case-insensitive versions.
Installation
npm install
The module exposes a single function.
Usage
const ci = // true // true // true // 1 // true // true // 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 | ✔ |