Iterates through the list and removes nodes where filter returns true
(filter: (value: T) => boolean)
| 762 | |
| 763 | /** Iterates through the list and removes nodes where filter returns true */ |
| 764 | prune(filter: (value: T) => boolean) { |
| 765 | for (const node of this.nodes()) { |
| 766 | if (filter(node.value)) { |
| 767 | this.remove(node); |
| 768 | } |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | clear() { |
| 773 | this.count = 0; |
no test coverage detected