master
1function (array, order) {
2 // sort with given order
3
4 var lib = LIBRARY;
5 if (l.is_func(order)) {
6 return array.sort(order);
7 }
8 return array.sort(function(a, b) {
9 return lib.cmp(a, b, order);
10 });
11}