doesitarm/helpers/matching.js
2021-03-04 20:44:23 -06:00

6 lines
139 B
JavaScript

// Match whole word
export function matchesWholeWord (needle, haystack) {
return new RegExp('\\b' + needle + '\\b').test(haystack)
}