* Remove item from array that pass the specified comparison function. * @param filter - The comparison function
(filter: (value: T) => boolean)
| 43 | * @param filter - The comparison function |
| 44 | */ |
| 45 | findAndRemove(filter: (value: T) => boolean): void { |
| 46 | const array = this._array; |
| 47 | for (let i = array.length - 1; i >= 0; i--) { |
| 48 | filter(array[i]) && this.removeByIndex(i); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * The index of the item. |
no test coverage detected