remeda
Version:
A utility library for JavaScript and Typescript.
51 lines • 2.47 kB
text/typescript
//#region src/toUpperCase.d.ts
/**
* Replaces all lowercase characters with their uppercase equivalents.
*
* This function is a wrapper around the built-in
* [`String.prototype.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)
* method and shares its _[locale inaccuracies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase#description)_.
*
* For a more linguistically accurate transformation use [`toLocaleUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase),
* and for display purposes use CSS [`text-transform: uppercase;`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform)
* which *is* locale-aware.
*
* For other case manipulations see: `toLowerCase`, `capitalize`,
* `uncapitalize`, `toCamelCase`, `toKebabCase`, `toSnakeCase`, and
* `toTitleCase`.
*
* @param data - A string.
* @signature
* R.toUpperCase(data);
* @example
* R.toUpperCase("Hello World"); // "HELLO WORLD"
* @dataFirst
* @category String
*/
declare function toUpperCase<T extends string>(data: T): Uppercase<T>;
/**
* Replaces all lowercase characters with their uppercase equivalents.
*
* This function is a wrapper around the built-in
* [`String.prototype.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)
* method and shares its _[locale inaccuracies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase#description)_.
*
* For a more linguistically accurate transformation use [`toLocaleUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase),
* and for display purposes use CSS [`text-transform: uppercase;`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform)
* which *is* locale-aware.
*
* For other case manipulations see: `toLowerCase`, `capitalize`,
* `uncapitalize`, `toCamelCase`, `toKebabCase`, `toSnakeCase`, and
* `toTitleCase`.
*
* @signature
* R.toUpperCase()(data);
* @example
* R.pipe("Hello World", R.toUpperCase()); // "HELLO WORLD"
* @dataLast
* @category String
*/
declare function toUpperCase(): <T extends string>(data: T) => Uppercase<T>;
//#endregion
export { toUpperCase };
//# sourceMappingURL=toUpperCase-DzbmkmzL.d.cts.map