index.js
function( url, options, callback ) {
	if ( typeof options === "function" ) {
		callback = options;
		options = null;
	}
	options = options || {};
	getTags( url, options, function( err, tagArray ) {
		var latest;
		if ( !err && Array.isArray( tagArray ) && tagArray.length > 0 ) {
			tagArray.sort( function( a, b ) {
				try {
					return semver.rcompare( a.name, b.name );
				}
				catch ( err2 ) {
					return -1;
				}
			} );
			latest = tagArray[0];
		}
		callback( err, latest );
	} );
}
function( url, options, callback ) {
	if ( typeof options === "function" ) {
		callback = options;
		options = null;
	}
	options = options || {};
	getTags( url, options, function( err, tagArray ) {
		var latest;
		if ( !err && Array.isArray( tagArray ) && tagArray.length > 0 ) {
			tagArray.sort( function( a, b ) {
				try {
					return semver.rcompare( a.name, b.name );
				}
				catch ( err2 ) {
					return -1;
				}
			} );
			latest = tagArray[0];
		}
		callback( err, latest );
	} );
}
function ( url , options , callback ) { if ( typeof options === "function" ) { callback = options ; options = null ; } options = options || { } ; getTags ( url , options , function ( err , tagArray ) { var latest ; if ( ! err && Array . isArray ( tagArray ) && tagArray . length > 0 ) { tagArray . sort ( function ( a , b ) { try { return semver . rcompare ( a . name , b . name ) ; } catch ( err2 ) { return - 1 ; } } ) ; latest = tagArray [ 0 ] ; } callback ( err , latest ) ; } ) ; }
Uses node's semver package to work out the latest tag value
@function getLatestTag
@memberof util
@param {string} url - Project URL to get latest tag for
@param {object} options - Options object
@param {function} [callback] - Complete callback
Uses node s semver package to work out the latest tag value