Skip to content

Commit 46b7cf7

Browse files
ThomasLandauerNarretz
authored andcommitted
docs(filter): document third argument of predicate function
1 parent 860edee commit 46b7cf7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ng/filter/filter.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
* `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but
3535
* **will** be matched by `{$: 'John'}`.
3636
*
37-
* - `function(value, index)`: A predicate function can be used to write arbitrary filters. The
38-
* function is called for each element of `array`. The final result is an array of those
39-
* elements that the predicate returned true for.
37+
* - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.
38+
* The function is called for each element of the array, with the element, its index, and
39+
* the entire array itself as arguments.
40+
*
41+
* The final result is an array of those elements that the predicate returned true for.
4042
*
4143
* @param {function(actual, expected)|true|undefined} comparator Comparator which is used in
4244
* determining if the expected value (from the filter expression) and actual value (from

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy