From 97b9bac715ee43f05f840f33e41af88b5c7287fd Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Fri, 17 Mar 2017 08:46:18 -0300 Subject: [PATCH 1/3] docs(filter): Clarifying the comparator parameter The previous description does not make it clear how this parameter is used with other parameters and its purpose. --- src/ng/filter/filter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ng/filter/filter.js b/src/ng/filter/filter.js index 37cdb0d6ca3b..09e1436cda25 100644 --- a/src/ng/filter/filter.js +++ b/src/ng/filter/filter.js @@ -44,9 +44,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. + * @param {function(actual, expected)|true|false} [comparator] A predicate to further refine the + * search results of an object or string expression. It should be used to determine if the + * actual value from the array is equal to the expected value from the filter expression. * * Can be one of: * From 756aacbd195617b7fc8aa6d97639d5b27ddf1436 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Tue, 21 Mar 2017 22:07:23 -0300 Subject: [PATCH 2/3] clarify the comparator parameter --- src/ng/filter/filter.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ng/filter/filter.js b/src/ng/filter/filter.js index 09e1436cda25..39f99ef730ec 100644 --- a/src/ng/filter/filter.js +++ b/src/ng/filter/filter.js @@ -44,9 +44,10 @@ * * The final result is an array of those elements that the predicate returned true for. * - * @param {function(actual, expected)|true|false} [comparator] A predicate to further refine the - * search results of an object or string expression. It should be used to determine if the - * actual value from the array is equal to the expected value from the filter expression. + * @param {function(actual, expected)|true|false} [comparator] Comparator which is used in + * determining if matches returned by the argument expression should be considered a match based + * on the the expected value (from the filter expression) and actual value (from the object in + * the array). * * Can be one of: * From a5375cb03cb1e6a535bb2e8711bcf0048ac76c90 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Wed, 22 Mar 2017 13:36:39 -0300 Subject: [PATCH 3/3] clarify the comparator parameter Explain that comparator is only called when expression is not a function. --- src/ng/filter/filter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ng/filter/filter.js b/src/ng/filter/filter.js index 39f99ef730ec..0fab59f64794 100644 --- a/src/ng/filter/filter.js +++ b/src/ng/filter/filter.js @@ -45,9 +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 matches returned by the argument expression should be considered a match based - * on the the expected value (from the filter expression) and actual value (from the object in - * the array). + * determining if values retrieved using expression (when it is not a function) should be + * considered a match based on the the expected value (from the filter expression) and actual + * value (from the object in the array). * * Can be one of: *