function filterMainTweets(statuses) {
        return new Promise(function(resolve) {
            resolve(statuses.map(function(status) {
                if('retweeted_status' in status) {
                    return status.retweeted_status;
                }
                return status;
            }));
        });
    }
/**
     * Choose the main tweet if its available
     * @param statuses
     * @returns {Promise}
     */
Choose the main tweet if its available
@param statuses
@returns {Promise}
Choose the main tweet if its available @param statuses @returns { Promise }
function filterMainTweets(statuses) {
        return new Promise(function(resolve) {
            resolve(statuses.map(function(status) {
                if('retweeted_status' in status) {
                    return status.retweeted_status;
                }
                return status;
            }));
        });
    }
function filterMainTweets ( statuses ) { return new Promise ( function ( resolve ) { resolve ( statuses . map ( function ( status ) { if ( 'retweeted_status' in status ) { return status . retweeted_status ; } return status ; } ) ) ; } ) ; }
Choose the main tweet if its available
 @param statuses
 @returns {Promise}
Choose the main tweet if its available @param statuses @returns { Promise }