UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

43 lines 1.82 kB
//#region src/uncapitalize.d.ts /** * Makes first character of a string lower-case. 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 [`Uncapitalize`](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#Uncapitalizestringtype) * utility type for typing. * * For other case manipulations see: `toUpperCase`, `toLowerCase`, `capitalize`, * `toCamelCase`, `toKebabCase`, and `toSnakeCase`. * * !IMPORTANT: This function might work _incorrectly_ for **non-ascii** inputs. * * @param data - A string. * @signature * R.uncapitalize(data); * @example * R.uncapitalize("HELLO WORLD"); // "hELLO WORLD" * @dataFirst * @category String */ declare function uncapitalize<T extends string>(data: T): Uncapitalize<T>; /** * Makes first character of a string upper-case. 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 [`Uncapitalize`](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html#Uncapitalizestringtype) * utility type for typing. * * For other case manipulations see: `toUpperCase`, `toLowerCase`, `capitalize`, * `toCamelCase`, `toKebabCase`, and `toSnakeCase`. * * !IMPORTANT: This function might work _incorrectly_ for **non-ascii** inputs. * * @signature * R.uncapitalize()(data); * @example * R.pipe("HELLO WORLD", R.uncapitalize()); // "hELLO WORLD" * @dataLast * @category String */ declare function uncapitalize(): <T extends string>(data: T) => Uncapitalize<T>; //#endregion export { uncapitalize }; //# sourceMappingURL=uncapitalize-Dm2C5Lgt.d.ts.map