From 07c67811511933e298ffafd10d51c2a11a8a2088 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 27 Mar 2022 18:13:44 -0500 Subject: Pretty names of harp leaderboards --- src/lib/utils.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib/utils.ts') diff --git a/src/lib/utils.ts b/src/lib/utils.ts index a4803df..547a122 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -130,6 +130,8 @@ export function millisecondsToTime(totalMilliseconds: number, opts: Milliseconds export function cleanId(id: string) { for (const string of ['deaths', 'kills', 'collection', 'skill']) id = moveToEndOfId(string, id) + if (id.startsWith('harp_') && id.endsWith('_completions')) + id = id.slice('harp_'.length) return id .replace(/^./, id[0].toUpperCase()) -- cgit