benchmark/packages/302/utils/getBrowserInformation.js
function getBrowserInformation(userAgent) {
  var browserInfo = _bowser2.default._detect(userAgent);

  for (var browser in prefixByBrowser) {
    if (browserInfo.hasOwnProperty(browser)) {
      var prefix = prefixByBrowser[browser];

      browserInfo.jsPrefix = prefix;
      browserInfo.cssPrefix = '-' + prefix.toLowerCase() + '-';
      break;
    }
  }

  browserInfo.browserName = getBrowserName(browserInfo);

  // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN
  if (browserInfo.version) {
    browserInfo.browserVersion = parseFloat(browserInfo.version);
  } else {
    browserInfo.browserVersion = parseInt(parseFloat(browserInfo.osversion), 10);
  }

  browserInfo.osVersion = parseFloat(browserInfo.osversion);

  // iOS forces all browsers to use Safari under the hood
  // as the Safari version seems to match the iOS version
  // we just explicitely use the osversion instead
  // https://github.com/rofrischmann/inline-style-prefixer/issues/72
  if (browserInfo.browserName === 'ios_saf' && browserInfo.browserVersion > browserInfo.osVersion) {
    browserInfo.browserVersion = browserInfo.osVersion;
  }

  // seperate native android chrome
  // https://github.com/rofrischmann/inline-style-prefixer/issues/45
  if (browserInfo.browserName === 'android' && browserInfo.chrome && browserInfo.browserVersion > 37) {
    browserInfo.browserName = 'and_chr';
  }

  // For android < 4.4 we want to check the osversion
  // not the chrome version, see issue #26
  // https://github.com/rofrischmann/inline-style-prefixer/issues/26
  if (browserInfo.browserName === 'android' && browserInfo.osVersion < 5) {
    browserInfo.browserVersion = browserInfo.osVersion;
  }

  // Samsung browser are basically build on Chrome > 44
  // https://github.com/rofrischmann/inline-style-prefixer/issues/102
  if (browserInfo.browserName === 'android' && browserInfo.samsungBrowser) {
    browserInfo.browserName = 'and_chr';
    browserInfo.browserVersion = 44;
  }

  return browserInfo;
}
function getBrowserInformation(userAgent) {
  var browserInfo = _bowser2.default._detect(userAgent);

  for (var browser in prefixByBrowser) {
    if (browserInfo.hasOwnProperty(browser)) {
      var prefix = prefixByBrowser[browser];

      browserInfo.jsPrefix = prefix;
      browserInfo.cssPrefix = '-' + prefix.toLowerCase() + '-';
      break;
    }
  }

  browserInfo.browserName = getBrowserName(browserInfo);

  // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN
  if (browserInfo.version) {
    browserInfo.browserVersion = parseFloat(browserInfo.version);
  } else {
    browserInfo.browserVersion = parseInt(parseFloat(browserInfo.osversion), 10);
  }

  browserInfo.osVersion = parseFloat(browserInfo.osversion);

  // iOS forces all browsers to use Safari under the hood
  // as the Safari version seems to match the iOS version
  // we just explicitely use the osversion instead
  // https://github.com/rofrischmann/inline-style-prefixer/issues/72
  if (browserInfo.browserName === 'ios_saf' && browserInfo.browserVersion > browserInfo.osVersion) {
    browserInfo.browserVersion = browserInfo.osVersion;
  }

  // seperate native android chrome
  // https://github.com/rofrischmann/inline-style-prefixer/issues/45
  if (browserInfo.browserName === 'android' && browserInfo.chrome && browserInfo.browserVersion > 37) {
    browserInfo.browserName = 'and_chr';
  }

  // For android < 4.4 we want to check the osversion
  // not the chrome version, see issue #26
  // https://github.com/rofrischmann/inline-style-prefixer/issues/26
  if (browserInfo.browserName === 'android' && browserInfo.osVersion < 5) {
    browserInfo.browserVersion = browserInfo.osVersion;
  }

  // Samsung browser are basically build on Chrome > 44
  // https://github.com/rofrischmann/inline-style-prefixer/issues/102
  if (browserInfo.browserName === 'android' && browserInfo.samsungBrowser) {
    browserInfo.browserName = 'and_chr';
    browserInfo.browserVersion = 44;
  }

  return browserInfo;
}
function getBrowserInformation ( userAgent ) { var browserInfo = _bowser2 . default . _detect ( userAgent ) ; for ( var browser in prefixByBrowser ) { if ( browserInfo . hasOwnProperty ( browser ) ) { var prefix = prefixByBrowser [ browser ] ; browserInfo . jsPrefix = prefix ; browserInfo . cssPrefix = '-' + prefix . toLowerCase ( ) + '-' ; break ; } } browserInfo . browserName = getBrowserName ( browserInfo ) ; // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN if ( browserInfo . version ) { browserInfo . browserVersion = parseFloat ( browserInfo . version ) ; } else { browserInfo . browserVersion = parseInt ( parseFloat ( browserInfo . osversion ) , 10 ) ; } browserInfo . osVersion = parseFloat ( browserInfo . osversion ) ; // iOS forces all browsers to use Safari under the hood // as the Safari version seems to match the iOS version // we just explicitely use the osversion instead // https://github.com/rofrischmann/inline-style-prefixer/issues/72 if ( browserInfo . browserName === 'ios_saf' && browserInfo . browserVersion > browserInfo . osVersion ) { browserInfo . browserVersion = browserInfo . osVersion ; } // seperate native android chrome // https://github.com/rofrischmann/inline-style-prefixer/issues/45 if ( browserInfo . browserName === 'android' && browserInfo . chrome && browserInfo . browserVersion > 37 ) { browserInfo . browserName = 'and_chr' ; } // For android < 4.4 we want to check the osversion // not the chrome version, see issue #26 // https://github.com/rofrischmann/inline-style-prefixer/issues/26 if ( browserInfo . browserName === 'android' && browserInfo . osVersion < 5 ) { browserInfo . browserVersion = browserInfo . osVersion ; } // Samsung browser are basically build on Chrome > 44 // https://github.com/rofrischmann/inline-style-prefixer/issues/102 if ( browserInfo . browserName === 'android' && browserInfo . samsungBrowser ) { browserInfo . browserName = 'and_chr' ; browserInfo . browserVersion = 44 ; } return browserInfo ; }
Uses bowser to get default browser browserInformation such as version and name
Evaluates bowser browserInfo and adds vendorPrefix browserInformation
@param {string} userAgent - userAgent that gets evaluated
Uses bowser to get default browser browserInformation such as version and name Evaluates bowser browserInfo and adds vendorPrefix browserInformation