trivial and outdated NPM packages

upper-case outdated npm logo

Converts a string to upper case.

Weekly Downloads
6,716,756
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.toUpperCase() method. It is supported by all modern browsers and Node.js versions since ES6 (2015).

// Convert a string to upper case
const str = "foo";

console.log(str.toUpperCase()); // "FOO"

Use String.prototype.toLocaleUpperCase() instead if you need to support non-English languages.

const dotted = "istanbul";

console.log(city.toLocaleUpperCase("en-US")); // "ISTANBUL"
console.log(city.toLocaleUpperCase("TR")); // "İSTANBUL"