From 0620516a05bf28e740d038d5f8aef6758fa06bf5 Mon Sep 17 00:00:00 2001 From: Manuel Bustillo Date: Sun, 1 Dec 2024 22:59:07 +0100 Subject: [PATCH] Restore function removed by bad merge --- app/lib/utils.ts | 5 +++++ 1 file changed, 5 insertions(+) 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); +} -- 2.47.1