lib/AdaptationEngine.js
function (list) {
		list.sort(function (a, b) {
			if (COMMAND_RANK[a.toString()] > COMMAND_RANK[b.toString()]) {
				return 1;
			} else if (COMMAND_RANK[a.toString()] < COMMAND_RANK[b.toString()]) {
				return -1;
			} else {
				return 0;
			}
		});

		return list;
	}
function (list) {
		list.sort(function (a, b) {
			if (COMMAND_RANK[a.toString()] > COMMAND_RANK[b.toString()]) {
				return 1;
			} else if (COMMAND_RANK[a.toString()] < COMMAND_RANK[b.toString()]) {
				return -1;
			} else {
				return 0;
			}
		});

		return list;
	}
function ( list ) { list . sort ( function ( a , b ) { if ( COMMAND_RANK [ a . toString ( ) ] > COMMAND_RANK [ b . toString ( ) ] ) { return 1 ; } else if ( COMMAND_RANK [ a . toString ( ) ] < COMMAND_RANK [ b . toString ( ) ] ) { return - 1 ; } else { return 0 ; } } ) ; return list ; }
Sorts primitives array according to COMMAND_RANK
@param list
@returns {*}
Sorts primitives array according to COMMAND_RANK