function filterStrings(statuses) {
        return new Promise(function(resolve) {
            resolve(statuses.filter(function(status) {
                var len  = strings.banned.length,
                    // TODO: Remove this line and move to another file (quick fix for Farsi)
                    text = persianJs(status.text.toLowerCase()).arabicChar().value(),
                    reg;

                // Check if id_str or name are banned
                for(var i = 0; i < len; i += 1) {
                    // Current string as RegExp
                    reg = new RegExp(strings.banned[i].toLowerCase(), 'i');

                    // If matched, then filter it out.
                    if(reg.test(text)) {
                        return false;
                    }
                }

                return true;
            }));
        });
    }
/**
     * Filter statuses based on banned strings
     * @param statuses
     * @returns {Promise}
     */
Filter statuses based on banned strings
@param statuses
@returns {Promise}
Filter statuses based on banned strings @param statuses @returns { Promise }
function filterStrings(statuses) {
        return new Promise(function(resolve) {
            resolve(statuses.filter(function(status) {
                var len  = strings.banned.length,
                    text = persianJs(status.text.toLowerCase()).arabicChar().value(),
                    reg;
                for(var i = 0; i < len; i += 1) {
                    reg = new RegExp(strings.banned[i].toLowerCase(), 'i');
                    if(reg.test(text)) {
                        return false;
                    }
                }
                return true;
            }));
        });
    }
function filterStrings ( statuses ) { return new Promise ( function ( resolve ) { resolve ( statuses . filter ( function ( status ) { var len = strings . banned . length , text = persianJs ( status . text . toLowerCase ( ) ) . arabicChar ( ) . value ( ) , reg ; for ( var i = 0 ; i < len ; i += 1 ) { reg = new RegExp ( strings . banned [ i ] . toLowerCase ( ) , 'i' ) ; if ( reg . test ( text ) ) { return false ; } } return true ; } ) ) ; } ) ; }
Filter statuses based on banned strings
 @param statuses
 @returns {Promise}
Filter statuses based on banned strings @param statuses @returns { Promise }
// TODO: Remove this line and move to another file (quick fix for Farsi) // Check if id_str or name are banned // Current string as RegExp // If matched, then filter it out.