(storage)
| 18 | let ordered = []; |
| 19 | |
| 20 | function arrangeItems(storage) { |
| 21 | const newButtons = [...buttons]; |
| 22 | const orderedButtons = []; |
| 23 | for (const ele of storage) { |
| 24 | const index = newButtons.findIndex((a) => ele[0] === a?.dataset.id); |
| 25 | if (index !== -1) { |
| 26 | orderedButtons.push([newButtons[index], ele[1]]); |
| 27 | newButtons[index] = undefined; |
| 28 | } |
| 29 | } |
| 30 | for (const button of newButtons) { |
| 31 | if (button) orderedButtons.push([button, SHOW]); |
| 32 | } |
| 33 | ordered = orderedButtons; |
| 34 | } |
| 35 | |
| 36 | function appendItems() { |
| 37 | const toShow = []; |
no outgoing calls
no test coverage detected