mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
refactor: components struture
This commit is contained in:
@ -12,6 +12,7 @@ export const getISODate = (date: Date): string => {
|
||||
/**
|
||||
* Calculates the age of a person based on their birth date.
|
||||
* @param birthDate
|
||||
* @returns
|
||||
*/
|
||||
export const getAge = (birthDate: Date): number => {
|
||||
const today = new Date()
|
||||
|
@ -1,3 +1,9 @@
|
||||
/**
|
||||
* 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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user