UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

47 lines 2.2 kB
//#region src/toLowerCase.d.ts /** * Lowers the case of all characters in the input. Uses the built-in [`String.prototype.toLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) * for the runtime, and the built-in [`Lowercase`](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#lowercasestringtype) * utility type for typing. * * For other case manipulations see: `toUpperCase`, `capitalize`, * `uncapitalize`, `toCamelCase`, `toKebabCase`, and `toSnakeCase`. * * !IMPORTANT: This function might work _incorrectly_ for **non-ascii** inputs. * If the output is intended for display (on a browser) consider using * [the `text-transform: lowercase;` CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform) * instead! * * @param data - A string. * @signature * R.toLowerCase(data); * @example * R.toLowerCase("Hello World"); // "hello world" * @dataFirst * @category String */ declare function toLowerCase<T extends string>(data: T): Lowercase<T>; /** * Lowers the case of all characters in the input. Uses the built-in [`String.prototype.toLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase) * for the runtime, and the built-in [`Lowercase`](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#lowercasestringtype) * utility type for typing. * * For other case manipulations see: `toUpperCase`, `capitalize`, * `uncapitalize`, `toCamelCase`, `toKebabCase`, and `toSnakeCase`. * * !IMPORTANT: This function might work _incorrectly_ for **non-ascii** inputs. * If the output is intended for display (on a browser) consider using * [the `text-transform" lowercase;` CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform) * instead! * * @signature * R.toLowerCase()(data); * @example * R.pipe("Hello World", R.toLowerCase()); // "hello world" * @dataLast * @category String */ declare function toLowerCase(): <T extends string>(data: T) => Lowercase<T>; //#endregion export { toLowerCase }; //# sourceMappingURL=toLowerCase-D8bQwHtX.d.ts.map