-1…*.indexOf() to native .includes()

This commit is contained in:
djmaze 2020-07-20 21:39:00 +02:00
parent eb15c6e45f
commit 961fa305c9
8 changed files with 19 additions and 19 deletions

View file

@ -73,7 +73,7 @@ class EmailModel {
* @returns {boolean}
*/
search(query) {
return -1 < (this.name + ' ' + this.email).toLowerCase().indexOf(query.toLowerCase());
return (this.name + ' ' + this.email).toLowerCase().includes(query.toLowerCase());
}
/**