Skip to content

Commit

Permalink
chore: use regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Cayla Hamann committed Jun 22, 2020
1 parent aa8404e commit 67d3e86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/matchSearchString.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const matchSearchString = (str, searchTerm) => {
return str.toLowerCase().includes(searchTerm.toLowerCase());
return new RegExp(searchTerm, 'i').test(str);
};

export default matchSearchString;

0 comments on commit 67d3e86

Please sign in to comment.