UNPKG

labo-components

Version:
14 lines (12 loc) 300 B
// check if the given string s contains one of the searchterms export const stringContains = (s, searchTerms) => { if (!s) { return false; } return searchTerms.some(term => { if (s.indexOf(term) >= 0) { return true; } return false; }); };