code: function getOS(guesses) {
        return reduce(guesses, function(result, guess) {
          var pattern = guess.pattern || qualify(guess);
          if (!result && (result =
                RegExp('\\b' + pattern + '(?:/[\\d.]+|[ \\w.]*)', 'i').exec(ua)
              )) {
            result = cleanupOS(result, pattern, guess.label || guess);
          }
          return result;
        });
      }
docs: Picks the OS name from an array of guesses.
  
  @private
  @param {Array} guesses An array of guesses.
  @returns {null|string} The detected OS name.