Skip to content

Commit

Permalink
docs(filter): document third argument of predicate function
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLandauer authored and Narretz committed Jun 15, 2015
1 parent 860edee commit 46b7cf7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ng/filter/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
* `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but
* **will** be matched by `{$: 'John'}`.
*
* - `function(value, index)`: A predicate function can be used to write arbitrary filters. The
* function is called for each element of `array`. The final result is an array of those
* elements that the predicate returned true for.
* - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.
* The function is called for each element of the array, with the element, its index, and
* the entire array itself as arguments.
*
* The final result is an array of those elements that the predicate returned true for.
*
* @param {function(actual, expected)|true|undefined} comparator Comparator which is used in
* determining if the expected value (from the filter expression) and actual value (from
Expand Down

0 comments on commit 46b7cf7

Please sign in to comment.