<commit_before>var getPrimaryVersion = function (req) {
  var primaryVersion = 0;
  var firstDotIndex = req.useragent.Version.indexOf('.');
  if(firstDotIndex < 0)
    primaryVersion = req.useragent.Version;
  else
    primaryVersion = req.useragent.Version.substr(0, firstDotIndex);
  return primaryVersion;
}

var supported = function (req) {

  req.useragent.PrimaryVersion = getPrimaryVersion(req);

  // sails.log.debug(req.useragent);

  if(req.useragent.isChrome && req.useragent.PrimaryVersion >= 33)
    return true;
  if(req.useragent.isFirefox && req.useragent.PrimaryVersion >= 32)
    return true;
  if(req.useragent.isFirefox && req.useragent.PrimaryVersion >= 32)<commit_msg>fix browser without version<commit_after>var getPrimaryVersion = function (req) {
  var primaryVersion = 0;
  var firstDotIndex = -1;
  if(typeof req.useragent.Version != 'undefined')
    firstDotIndex = req.useragent.Version.indexOf('.');
  if(firstDotIndex < 0)
    primaryVersion = req.useragent.Version;
  else
    primaryVersion = req.useragent.Version.substr(0, firstDotIndex);
  return primaryVersion;
}

var supported = function (req) {

  req.useragent.PrimaryVersion = getPrimaryVersion(req);

  // sails.log.debug(req.useragent);

  if(req.useragent.isChrome && req.useragent.PrimaryVersion >= 33)
    return true;
  if(req.useragent.isFirefox && req.useragent.PrimaryVersion >= 32)
    return true;
  if(req.useragent.isFirefox && req.useragent.PrimaryVersion >= 32)
{'fraction_non_alphanumeric': 0.12465940054495912, 'fraction_numerical': 0.012942779291553134, 'mean_word_length': 4.440740740740741, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6871098', 'n_tokens_mistral': 482, 'n_tokens_neox': 458, 'n_words': 87}