function filterUsers(statuses) {
        return new Promise(function(resolve) {
            resolve(statuses.filter(function(status) {
                var len = users.banned.length,
                    screenName = status.user.screen_name.toLowerCase(),
                    name = status.user.name.toLowerCase(),
                    reg, curr;

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

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

                // Add otherwise
                return true;
            }));
        });
    }
/**
     * Filter statuses array based on banned users
     * @param statuses
     * @returns {Promise}
     */
Filter statuses array based on banned users
@param statuses
@returns {Promise}
Filter statuses array based on banned users @param statuses @returns { Promise }
function filterUsers(statuses) {
        return new Promise(function(resolve) {
            resolve(statuses.filter(function(status) {
                var len = users.banned.length,
                    screenName = status.user.screen_name.toLowerCase(),
                    name = status.user.name.toLowerCase(),
                    reg, curr;
                for(var i = 0; i < len; i += 1) {
                    curr = users.banned[i].toLowerCase();
                    reg  = new RegExp(curr, 'i');
                    if(reg.test(name) || reg.test(screenName)) {
                        return false;
                    }
                }
                return true;
            }));
        });
    }
function filterUsers ( statuses ) { return new Promise ( function ( resolve ) { resolve ( statuses . filter ( function ( status ) { var len = users . banned . length , screenName = status . user . screen_name . toLowerCase ( ) , name = status . user . name . toLowerCase ( ) , reg , curr ; for ( var i = 0 ; i < len ; i += 1 ) { curr = users . banned [ i ] . toLowerCase ( ) ; reg = new RegExp ( curr , 'i' ) ; if ( reg . test ( name ) || reg . test ( screenName ) ) { return false ; } } return true ; } ) ) ; } ) ; }
Filter statuses array based on banned users
 @param statuses
 @returns {Promise}
Filter statuses array based on banned users @param statuses @returns { Promise }
// Check if id_str or name are banned // Current name as RegExp // If matched, then filter it out. // Add otherwise