diff options
| author | Max Nanis | 2026-09-29 18:53:10 +0000 |
|---|---|---|
| committer | Max Nanis | 2026-09-29 18:53:10 +0000 |
| commit | 3e7eb6ca784bc062bd1c7129e40b8705543d8469 (patch) | |
| tree | 30bc2883ab3397f290fb494fd38b96d47ac701b9 /jb-ui/src/lib/utils.ts | |
| parent | d43e82fd2c799410b15706d10dbbcaa838325a4d (diff) | |
| parent | cd173e67e4e0514271371f4a5e5136f7f61d06d1 (diff) | |
| download | amt-jb-3e7eb6ca784bc062bd1c7129e40b8705543d8469.tar.gz amt-jb-3e7eb6ca784bc062bd1c7129e40b8705543d8469.zip | |
Merges pull request #6
Redemption Modal. Redemption Magic flow. User Account Icon
Diffstat (limited to 'jb-ui/src/lib/utils.ts')
| -rw-r--r-- | jb-ui/src/lib/utils.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jb-ui/src/lib/utils.ts b/jb-ui/src/lib/utils.ts index 1aa59c6..d20703b 100644 --- a/jb-ui/src/lib/utils.ts +++ b/jb-ui/src/lib/utils.ts @@ -117,3 +117,7 @@ export function titleCase(str: string): string { .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .join(" "); } + +export function stripPriceFromTitle(title: string): string { + return title.replace(/\s*\$\d+(\.\d{1,2})?\s*$/, "").trim(); +} |
