mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
js: Convert _.any(a, …), _.some(a, …) to a.some(…).
And convert the corresponding function expressions to arrow style while we’re here. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
2285ee922e
commit
70ff164f89
@@ -17,11 +17,7 @@ exports.vanilla_match = function (opts) {
|
||||
This is case insensitive.
|
||||
*/
|
||||
const val = opts.val.toLowerCase();
|
||||
return _.any(opts.search_terms, function (term) {
|
||||
if (val.includes(term)) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return opts.search_terms.some(term => val.includes(term));
|
||||
};
|
||||
|
||||
window.search_util = exports;
|
||||
|
||||
Reference in New Issue
Block a user