chore(packages): add more docs and improve types

This commit is contained in:
PalmDevs
2023-11-25 23:01:49 +07:00
parent 306f627cef
commit a49f45127c
5 changed files with 91 additions and 36 deletions

View File

@@ -1,3 +1,8 @@
/**
* Uncapitalizes the first letter of a string
* @param str The string to uncapitalize
* @returns The uncapitalized string
*/
export function uncapitalize<T extends string>(str: T): Uncapitalize<T> {
return (str.charAt(0).toLowerCase() + str.slice(1)) as Uncapitalize<T>
}