From e5dac8b9d61b175b09d859643a94ea91ee6ef48d Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Tue, 10 Jun 2025 02:51:37 +0700 Subject: Demographics page. userMarketplaceAnswer & userUpkAnswer redux stores. --- src/lib/utils.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/utils.ts') diff --git a/src/lib/utils.ts b/src/lib/utils.ts index b1cd120..ed75d2f 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -34,3 +34,10 @@ export function formatCentsToUSD(cents: number): string { currency: 'USD', }).format(cents / 100) } + +export function titleCase(str: string): string { + return str + .split(" ") + .map(word => word.charAt(0).toUpperCase() + word.slice(1)) + .join(" "); +} \ No newline at end of file -- cgit v1.2.3