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

docs(filter): clarify the comparator parameter #15827

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ng/filter/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
* The final result is an array of those elements that the predicate returned true for.
*
* @param {function(actual, expected)|true|false} [comparator] Comparator which is used in
* determining if the expected value (from the filter expression) and actual value (from
* the object in the array) should be considered a match.
* determining if matches returned by the argument expression should be considered a match based
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The matches are not returned by the expression argument. How about something like:

determining if values retrieved using expression should be...

* on the the expected value (from the filter expression) and actual value (from the object in
* the array).
*
* Can be one of:
*
Expand Down