src/similarweb.js
/**
 * Check if all item in list finish getting traffic data
 * @param {array} list An array storing object
 * @return {bool} whether all item finish getting traffic data
 */
Check if all item in list finish getting traffic data
@param {array} list An array storing object
@return {bool} whether all item finish getting traffic data
Check if all item in list finish getting traffic data @param { array } list An array storing object @return { bool } whether all item finish getting traffic data
function checkAllTrafficSuccess(list) {
  for (let i=0; i<list.length; i++) {
    if (!list[i].hasOwnProperty('traffic') || !list[i].traffic.success) {
      return false;
    }
  }
  return true;
}
function checkAllTrafficSuccess ( list ) { for ( let i = 0 ; i < list . length ; i ++ ) { if ( ! list [ i ] . hasOwnProperty ( 'traffic' ) || ! list [ i ] . traffic . success ) { return false ; } } return true ; }
Check if all item in list finish getting traffic data
 @param {array} list An array storing object
 @return {bool} whether all item finish getting traffic data
Check if all item in list finish getting traffic data @param { array } list An array storing object @return { bool } whether all item finish getting traffic data