diff options
author | mat <github@matdoes.dev> | 2022-03-27 18:13:44 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-27 18:13:44 -0500 |
commit | 07c67811511933e298ffafd10d51c2a11a8a2088 (patch) | |
tree | 18f9b25bada6d6205cff56491426e7c03512cacf /src | |
parent | 13125a56267f2a88ed0a38833ea6bc1a7e64775c (diff) | |
download | skyblock-stats-07c67811511933e298ffafd10d51c2a11a8a2088.tar.gz skyblock-stats-07c67811511933e298ffafd10d51c2a11a8a2088.tar.bz2 skyblock-stats-07c67811511933e298ffafd10d51c2a11a8a2088.zip |
Pretty names of harp leaderboards
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/utils.ts | 2 |
1 files changed, 2 insertions, 0 deletions
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()) |