Every line of 'jquery check if string contains specific word' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
66 function searchForWord($, word) { 67 var bodyText = $('html > body').text().toLowerCase(); 68 return (bodyText.indexOf(word.toLowerCase()) !== -1); 69 }
569 function hasWord(word) { 570 return option.searchText.indexOf(word) !== -1; 571 }
100 checkWordInSearchText(word: string) { 101 return this.translateService.instant(word).toLowerCase().indexOf(this.searchTextValue.toLowerCase()) !== -1; 102 }
4 function stringContains(string, value) { 5 return string.indexOf(value) !== -1 6 }
14 export default function contains(str: string, searchStr: string): boolean { 15 return str.indexOf(searchStr) !== -1; 16 }
47 function endsWith(word, string){ 48 if (!string || !word || string.length > word.length) 49 return false; 50 return word.indexOf(string) == word.length - string.length; 51 }
137 export function contains(text: string, substring: string): boolean { 138 return text.indexOf(substring) > -1; 139 }
109 function contentsDivHas(word) { 110 return ($("#tutorial-contents-div").text().indexOf(word) > -1 ); 111 }
62 function check(word, query) { 63 return checks[word](query) 64 }
40 value: function contains(string, needle) { 41 var search = string.match(needle); 42 return search && search.length > 0; 43 }