MCPcopy Index your code
hub / github.com/ampproject/amphtml / purge

Method purge

src/service/task-queue.js:151–158  ·  view source on GitHub ↗

* Removes tasks in queue that pass the callback test. * @param {function(!TaskDef):boolean} callback Return true to remove the task.

(callback)

Source from the content-addressed store, hash-verified

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}

Callers 1

cleanupTasks_Method · 0.80

Calls 2

removeAtIndexMethod · 0.95
callbackFunction · 0.50

Tested by

no test coverage detected