Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

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

+5-3
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)