platform.js
function getVersion(patterns) {
      return reduce(patterns, function(result, pattern) {
        return result || (RegExp(pattern +
          '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null;
      });
    }
function getVersion(patterns) {
      return reduce(patterns, function(result, pattern) {
        return result || (RegExp(pattern +
          '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)', 'i').exec(ua) || 0)[1] || null;
      });
    }
function getVersion ( patterns ) { return reduce ( patterns , function ( result , pattern ) { return result || ( RegExp ( pattern + '(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)' , 'i' ) . exec ( ua ) || 0 ) [ 1 ] || null ; } ) ; }
Resolves the version using an array of UA patterns.

@private
@param {Array} patterns An array of UA patterns.
@returns {null|string} The detected version.
Resolves the version using an array of UA patterns .