feat(core): add the find method to QueryList
This commit is contained in:
@ -57,6 +57,12 @@ export class QueryList<T>/* implements Iterable<T> */ {
|
||||
return this._results.filter(fn);
|
||||
}
|
||||
|
||||
/**
|
||||
* See
|
||||
* [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
|
||||
*/
|
||||
find(fn: (item: T, index: number, array: T[]) => boolean): T { return this._results.find(fn); }
|
||||
|
||||
/**
|
||||
* See
|
||||
* [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
|
||||
|
Reference in New Issue
Block a user