static/ext/src/version/Version.js
function(current, target) {
            var currentValue, targetValue, i;

            current = new Version(current).toArray();
            target = new Version(target).toArray();

            for (i = 0; i < Math.max(current.length, target.length); i++) {
                currentValue = this.getComponentValue(current[i]);
                targetValue = this.getComponentValue(target[i]);

                if (currentValue < targetValue) {
                    return -1;
                } else if (currentValue > targetValue) {
                    return 1;
                }
            }

            return 0;
        }
function(current, target) {
            var currentValue, targetValue, i;

            current = new Version(current).toArray();
            target = new Version(target).toArray();

            for (i = 0; i < Math.max(current.length, target.length); i++) {
                currentValue = this.getComponentValue(current[i]);
                targetValue = this.getComponentValue(target[i]);

                if (currentValue < targetValue) {
                    return -1;
                } else if (currentValue > targetValue) {
                    return 1;
                }
            }

            return 0;
        }
function ( current , target ) { var currentValue , targetValue , i ; current = new Version ( current ) . toArray ( ) ; target = new Version ( target ) . toArray ( ) ; for ( i = 0 ; i < Math . max ( current . length , target . length ) ; i ++ ) { currentValue = this . getComponentValue ( current [ i ] ) ; targetValue = this . getComponentValue ( target [ i ] ) ; if ( currentValue < targetValue ) { return - 1 ; } else if ( currentValue > targetValue ) { return 1 ; } } return 0 ; }
Compare 2 specified versions, starting from left to right. If a part contains special version strings,
they are handled in the following order:
'dev' < 'alpha' = 'a' < 'beta' = 'b' < 'RC' = 'rc' < '#' < 'pl' = 'p' < 'anything else'

@static
@param {String} current The current version to compare to
@param {String} target The target version to compare to
@return {Number} Returns -1 if the current version is smaller than the target version, 1 if greater, and 0 if they're equivalent
Compare 2 specified versions starting from left to right . If a part contains special version strings they are handled in the following order : dev < alpha = a < beta = b < RC = rc < # < pl = p < anything else