diff --git a/app/lib/utils.ts b/app/lib/utils.ts index 09359e4..069744a 100644 --- a/app/lib/utils.ts +++ b/app/lib/utils.ts @@ -8,3 +8,8 @@ export const getCsrfToken = () => { } export const getSlug = () => localStorage.getItem('slug') || 'default'; + +// From https://stackoverflow.com/a/1026087/3607039 +export const capitalize = (val:string) => { + return String(val).charAt(0).toUpperCase() + String(val).slice(1); +}