src/rgbquant.js
function sortedHashKeys(obj, desc) {
		var keys = [];

		for (var key in obj)
			keys.push(key);

		return sort.call(keys, function(a,b) {
			return desc ? obj[b] - obj[a] : obj[a] - obj[b];
		});
	}
function sortedHashKeys(obj, desc) {
		var keys = [];

		for (var key in obj)
			keys.push(key);

		return sort.call(keys, function(a,b) {
			return desc ? obj[b] - obj[a] : obj[a] - obj[b];
		});
	}
function sortedHashKeys ( obj , desc ) { var keys = [ ] ; for ( var key in obj ) keys . push ( key ) ; return sort . call ( keys , function ( a , b ) { return desc ? obj [ b ] - obj [ a ] : obj [ a ] - obj [ b ] ; } ) ; }
returns array of hash keys sorted by their values
returns array of hash keys sorted by their values