feat(core): Add QueryList#forEach
This commit is contained in:
@ -51,6 +51,11 @@ export class QueryList<T> {
|
||||
*/
|
||||
reduce<U>(fn: (acc: U, item: T) => U, init: U): U { return this._results.reduce(fn, init); }
|
||||
|
||||
/**
|
||||
* executes function for each element in a query.
|
||||
*/
|
||||
forEach(fn: (item: T) => void): void { this._results.forEach(fn); }
|
||||
|
||||
/**
|
||||
* converts QueryList into an array
|
||||
*/
|
||||
|
Reference in New Issue
Block a user