This commit is contained in:
Maciej Caderek
2022-02-14 22:56:07 +01:00
parent 15ccd8acbf
commit c8fd7a05f1
13 changed files with 94 additions and 47 deletions

View File

@@ -42,7 +42,10 @@ const compressPGN = (pgn: string) => {
const header = Object.entries(game.header())
.filter(([key]) => PGN_KEYS.includes(key))
.map(([key, val]) => `${key[0].toUpperCase()} ${val}`)
.map(
([key, val]) =>
`${PGN_KEYS_TO_SHORT[key as keyof typeof PGN_KEYS_TO_SHORT]} ${val}`
)
.sort()
.join("\n");