* Removes tasks in queue that pass the callback test. * @param {function(!TaskDef):boolean} callback Return true to remove the task.
(callback)
| 149 | * @param {function(!TaskDef):boolean} callback Return true to remove the task. |
| 150 | */ |
| 151 | purge(callback) { |
| 152 | let index = this.tasks_.length; |
| 153 | while (index--) { |
| 154 | if (callback(this.tasks_[index])) { |
| 155 | this.removeAtIndex(this.tasks_[index], index); |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | } |
no test coverage detected