lib/toxi/color/ColorList.js
function(comp, isReversed){
        //if a normal ( a, b ) sort function instead of an AccessCriteria,
        //wrap it so it can be invoked the same
        if( typeof comp === 'function' && typeof comp.compare === 'undefined' ){
            comp = { compare: comp };
        }
		this.colors.sort( comp.compare );
		if(isReversed){
			this.colors.reverse();
		}
		return this;
	}
function(comp, isReversed){
        //if a normal ( a, b ) sort function instead of an AccessCriteria,
        //wrap it so it can be invoked the same
        if( typeof comp === 'function' && typeof comp.compare === 'undefined' ){
            comp = { compare: comp };
        }
		this.colors.sort( comp.compare );
		if(isReversed){
			this.colors.reverse();
		}
		return this;
	}
function ( comp , isReversed ) { //if a normal ( a, b ) sort function instead of an AccessCriteria, //wrap it so it can be invoked the same if ( typeof comp === 'function' && typeof comp . compare === 'undefined' ) { comp = { compare : comp } ; } this . colors . sort ( comp . compare ) ; if ( isReversed ) { this . colors . reverse ( ) ; } return this ; }
Sorts the list using the given comparator.
@param comp
comparator
@param isReversed
true, if reversed sort
@return itself
Sorts the list using the given comparator .