[+] Top 10 out of recent 40

This commit is contained in:
Azalea
2024-12-26 23:15:14 -05:00
parent 42d94b43b1
commit 77a791e5da
3 changed files with 10 additions and 5 deletions

View File

@@ -9,9 +9,12 @@
export let comp: string | undefined;
export let allMusics: Record<string, MusicMeta>;
export let game: GameName;
export let top: number | undefined = undefined;
const split = comp?.split(",")?.filter(it => it.split(":")[0] !== '0')
?.map(it => parseComposition(it, allMusics[it.split(":")[0]], game))
let split = comp?.split(",")?.filter(it => it.split(":")[0] !== '0')
?.map(it => parseComposition(it, allMusics, game))
if (top) split = split?.toSorted((a, b) => b.score - a.score).slice(0, top)
if (split) console.log("Split", split)
</script>