About
This dependency reimplements the native String.prototype.toLowerCase() method. It is supported by all modern browsers and Node.js versions since the beginning of JavaScript.
// Convert a string to lower case
const str = "FOO";
console.log(str.toLowerCase()); // "foo"
Use String.prototype.toLocaleLowerCase() instead if you need to support non-English languages.
const dotted = "İstanbul";
console.log(`EN-US: ${dotted.toLocaleLowerCase("en-US")}`); // "i̇stanbul"
console.log(`TR: ${dotted.toLocaleLowerCase("tr")}`); // "istanbul"