function highestSemVersion(versions) {
    var results = [];

    _.forEach(versions, function (value) {
      results.push({value: value.version, float: parseVersionFloat(value.version)});
    });

    results = results.sort(function (a, b) {
      return b.float - a.float;
    });

    var highestVersion = results[0].value;

    return _.filter(versions, function (num) {
      return num.version === highestVersion;
    })[0];
  }
/**
   * Based on an Array of objects containing name and a version in sem version syntax
   * return the object with the highest version.
   *
   * @param versions
   * @returns {*}
   */
Based on an Array of objects containing name and a version in sem version syntax
return the object with the highest version.

@param versions
@returns {*}
Based on an Array of objects containing name and a version in sem version syntax return the object with the highest version . @param versions @returns { * }
function highestSemVersion(versions) {
    var results = [];
    _.forEach(versions, function (value) {
      results.push({value: value.version, float: parseVersionFloat(value.version)});
    });
    results = results.sort(function (a, b) {
      return b.float - a.float;
    });
    var highestVersion = results[0].value;
    return _.filter(versions, function (num) {
      return num.version === highestVersion;
    })[0];
  }
function highestSemVersion ( versions ) { var results = [ ] ; _ . forEach ( versions , function ( value ) { results . push ( { value : value . version , float : parseVersionFloat ( value . version ) } ) ; } ) ; results = results . sort ( function ( a , b ) { return b . float - a . float ; } ) ; var highestVersion = results [ 0 ] . value ; return _ . filter ( versions , function ( num ) { return num . version === highestVersion ; } ) [ 0 ] ; }
Based on an Array of objects containing name and a version in sem version syntax
 return the object with the highest version.
Based on an Array of objects containing name and a version in sem version syntax return the object with the highest version .