()
| 34 | } |
| 35 | |
| 36 | function appendItems() { |
| 37 | const toShow = []; |
| 38 | const toHide = []; |
| 39 | const toStick = []; |
| 40 | for (const el of ordered) { |
| 41 | const [item, status] = el; |
| 42 | if (status === STICKY) { |
| 43 | appItems.append(item); |
| 44 | toStick.push(el); |
| 45 | } else if (status === SHOW) { |
| 46 | list.append(item); |
| 47 | toShow.push(el); |
| 48 | } else { |
| 49 | hiddenList.append(item); |
| 50 | toHide.push(el); |
| 51 | } |
| 52 | } |
| 53 | ordered = [...toStick, ...toShow, ...toHide]; |
| 54 | } |
| 55 | |
| 56 | function writeStorage() { |
| 57 | const array = ordered.map((a) => [a[0].dataset.id, a[1]]); |
no outgoing calls
no test coverage detected