From 97660781a7c3299357dc32a3bea72a058a6d9e06 Mon Sep 17 00:00:00 2001 From: rhiannon morris Date: Sun, 7 Jul 2024 20:11:45 +0200 Subject: [PATCH] replace Array.from with a splat or whatever it's called --- script/gallery.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/gallery.ts b/script/gallery.ts index b6d043b..fb0ea66 100644 --- a/script/gallery.ts +++ b/script/gallery.ts @@ -11,7 +11,7 @@ let showSingles = false; function fillSets(): [Set, Set] { function checkedValues(boxes: Boxes) { - return new Set(Array.from(boxes).filter(b => b.checked).map(b => b.value)); + return new Set([...boxes].filter(b => b.checked).map(b => b.value)); } return [checkedValues(reqBoxes), checkedValues(excBoxes)]; @@ -38,7 +38,7 @@ function updateItems() { } function disp(pfx: string, tags: string[]) { - return Array(...tags).map(x => pfx + x).join('\u2003'); // em space + return [...tags].map(x => pfx + x).join('\u2003'); // em space } let plus = disp('+\u2009', Array.from(reqTags)); // thin space let minus = disp('-\u2009', Array.from(excTags));