Advertisement
DarthCoffee

Untitled

Jul 18th, 2020
4,351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let nameSearch = () => {
  2.         let found = false;
  3.         if (isFilterSet) {
  4.           console.log(searchTerms)
  5.           for (const col in searchTerms) {
  6.             if (data[col].toString().toLowerCase() === searchTerms[col].toLowerCase()) {
  7.               found = true
  8.             }
  9.             else {
  10.               found = false
  11.               break;
  12.             }
  13.           }
  14.           return found
  15.         } else {
  16.           return true;
  17.         }
  18.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement