trivial and outdated NPM packages

lower-case outdated npm logo

Converts a string to lower case.

Weekly Downloads
15,906,822
Dependencies
0
Latest Release
2 years ago
Switch to the native implementation.
Outdated
natively supported
since 13 years (chrome, firefox, safari, nodejs)

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"