1
1
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:
2024-07-31 11:41:39 +02:00
parent ceeeb2f9c5
commit b5c50728de
72 changed files with 122 additions and 114 deletions

View File

@ -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()

View File

@ -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)
}