index.js
function aggregate(browsers) {
  const map = new Map();

  browsers.forEach((browser) => {
    const name = browser.api_name.toLowerCase();
    let value = map.get(name);

    if (value === undefined) {
      value = [];
      map.set(name, value);
    }

    value.push(browser);
  });

  const ie = map.get('internet explorer');

  map.set('iexplore', ie).set('ie', ie);
  map.set('googlechrome', map.get('chrome'));

  return map;
}
function aggregate(browsers) {
  const map = new Map();

  browsers.forEach((browser) => {
    const name = browser.api_name.toLowerCase();
    let value = map.get(name);

    if (value === undefined) {
      value = [];
      map.set(name, value);
    }

    value.push(browser);
  });

  const ie = map.get('internet explorer');

  map.set('iexplore', ie).set('ie', ie);
  map.set('googlechrome', map.get('chrome'));

  return map;
}
function aggregate ( browsers ) { const map = new Map ( ) ; browsers . forEach ( ( browser ) => { const name = browser . api_name . toLowerCase ( ) ; let value = map . get ( name ) ; if ( value === undefined ) { value = [ ] ; map . set ( name , value ) ; } value . push ( browser ) ; } ) ; const ie = map . get ( 'internet explorer' ) ; map . set ( 'iexplore' , ie ) . set ( 'ie' , ie ) ; map . set ( 'googlechrome' , map . get ( 'chrome' ) ) ; return map ; }
Aggregate a list of platforms by `api_name`.

@param {Array} browsers The list of platforms supported on Sauce Labs
@return {Map} Aggregated list
@private
Aggregate a list of platforms by api_name .