lib/fetching/channels/crowdtangle.js
/**
     * Returns whether any of the given set of words are found
     * within the given post fetched from CrowdTangle.
     */
Returns whether any of the given set of words are found
within the given post fetched from CrowdTangle.
Returns whether any of the given set of words are found within the given post fetched from CrowdTangle .
doesPostMatchWords(post, words) {
        const { content, raw } = post;
        const regex = new RegExp(words.join("|"), 'gi');
        if (
            words.length
            && (
                regex.test(content)
                || regex.test(raw.caption)
                || regex.test(raw.title)
                || regex.test(raw.description)
                || regex.test(raw.imageText)
            )
        ) {
            return true;
        }
        return false;
    }
doesPostMatchWords ( post , words ) { const { content , raw } = post ; const regex = new RegExp ( words . join ( "|" ) , 'gi' ) ; if ( words . length && ( regex . test ( content ) || regex . test ( raw . caption ) || regex . test ( raw . title ) || regex . test ( raw . description ) || regex . test ( raw . imageText ) ) ) { return true ; } return false ; }
Returns whether any of the given set of words are found
 within the given post fetched from CrowdTangle.
Returns whether any of the given set of words are found within the given post fetched from CrowdTangle .