1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-02-08 21:59:39 +01:00
.profile/packages/utils/src/strings.ts

10 lines
256 B
TypeScript

/**
* Capitalize the first letter of a string.
* @param string
* @returns
* @example capitalize("hello, world!") // "Hello, world!"
*/
export const capitalize = (string: string): string => {
return string.charAt(0).toUpperCase() + string.slice(1)
}