replace Array.from with a splat or whatever it's called
This commit is contained in:
parent
b1b0f806d5
commit
97660781a7
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ let showSingles = false;
|
|||
|
||||
function fillSets(): [Set<string>, Set<string>] {
|
||||
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));
|
||||
|
|
Loading…
Reference in a new issue