mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Move matchesWholeWord into mathing file
This commit is contained in:
parent
a5333b1939
commit
c2bb2d9787
3 changed files with 7 additions and 8 deletions
6
helpers/matching.js
Normal file
6
helpers/matching.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
// Match whole word
|
||||
export function matchesWholeWord (needle, haystack) {
|
||||
return new RegExp('\\b' + needle + '\\b').test(haystack)
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue