src/extensibility/node/package-validator.js
function containsWords(wordlist, str) {
    var i;
    var matches = [];
    for (i = 0; i < wordlist.length; i++) {
        var re = new RegExp("\\b" + wordlist[i] + "\\b", "i");
        if (re.exec(str)) {
            matches.push(wordlist[i]);
        }
    }
    return matches;
}
function containsWords(wordlist, str) {
    var i;
    var matches = [];
    for (i = 0; i < wordlist.length; i++) {
        var re = new RegExp("\\b" + wordlist[i] + "\\b", "i");
        if (re.exec(str)) {
            matches.push(wordlist[i]);
        }
    }
    return matches;
}
function containsWords ( wordlist , str ) { var i ; var matches = [ ] ; for ( i = 0 ; i < wordlist . length ; i ++ ) { var re = new RegExp ( "\\b" + wordlist [ i ] + "\\b" , "i" ) ; if ( re . exec ( str ) ) { matches . push ( wordlist [ i ] ) ; } } return matches ; }
Determines if any of the words in wordlist appear in str.

@param {String[]} wordlist list of words to check
@param {String} str to check for words
@return {String[]} words that matched
Determines if any of the words in wordlist appear in str .