mirror of
https://github.com/maxswa/osrs-json-hiscores.git
synced 2025-10-15 10:19:04 +00:00
Fix csv parsing, tests.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
58378,99,14103220
|
||||
13188,99,16573909
|
||||
36283,99,15061037
|
||||
17138,99,14670565
|
||||
17137,99,14670565
|
||||
8751,99,16169665
|
||||
60803,99,14390315
|
||||
1718,99,57850681
|
||||
@@ -90,7 +90,7 @@
|
||||
113862,201
|
||||
1969,538
|
||||
12346,671
|
||||
5608,149
|
||||
5606,149
|
||||
550,2450
|
||||
25557,310
|
||||
1391,538
|
||||
@@ -103,6 +103,6 @@
|
||||
287,7096
|
||||
97368,51
|
||||
15591,2780
|
||||
1000407,67
|
||||
1000405,67
|
||||
213696,25
|
||||
240082,340
|
Can't render this file because it has a wrong number of fields in line 25.
|
@@ -227,8 +227,14 @@ export function parseStats(csv: string): Stats {
|
||||
const [leaguePoints, deadmanPoints] = activityObjects.splice(0, 2);
|
||||
const bhObjects = activityObjects.splice(0, BH_MODES.length);
|
||||
const clueObjects = activityObjects.splice(0, CLUES.length);
|
||||
const [lastManStanding, pvpArena, soulWarsZeal, riftsClosed, colosseumGlory, collectionsLogged] =
|
||||
activityObjects.splice(0, 6);
|
||||
const [
|
||||
lastManStanding,
|
||||
pvpArena,
|
||||
soulWarsZeal,
|
||||
riftsClosed,
|
||||
colosseumGlory,
|
||||
collectionsLogged
|
||||
] = activityObjects.splice(0, 6);
|
||||
const bossObjects = activityObjects.splice(0, BOSSES.length);
|
||||
|
||||
const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => {
|
||||
|
@@ -123,6 +123,7 @@ export const BOSSES: Boss[] = [
|
||||
'corruptedGauntlet',
|
||||
'hueycoatl',
|
||||
'leviathan',
|
||||
'royalTitans',
|
||||
'whisperer',
|
||||
'theatreOfBlood',
|
||||
'theatreOfBloodHardMode',
|
||||
@@ -158,6 +159,7 @@ export const ACTIVITIES: ActivityName[] = [
|
||||
'soulWarsZeal',
|
||||
'riftsClosed',
|
||||
'colosseumGlory',
|
||||
'collectionsLogged',
|
||||
...BOSSES
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user