export const array_sort = ({
array: a,
boolean_ascending: b = !0,
function_prepare: p = (any_element) => any_element + "",
}) => {
var mapSort=(function(){'use strict';function defaultCompareFunction(a,b){var c=a+"",d=b+"";return c<d?-1:c==d?0:1}var forEach=[].forEach;function mapSort(a,b,c){if("function"!=typeof b)throw new TypeError(b+" is not a function");var d,e=[],f=[],g=[];forEach.call(a,function(a,h,i){if(d=b(a,h,i),void 0===d)return void g.push(a);if(void 0===c&&"symbol"==typeof d)throw new TypeError("Can't convert symbol to string");e.push(h),f[h]=d;}),void 0===c&&(c=defaultCompareFunction),e.sort(function(a,b){return c(f[a],f[b])});var h=e.map(function(b){return a[b]}).concat(g);return h.length!=a.length&&(h.length=a.length),h}return mapSort;}());
return mapSort(
a,
p,
b
? (any_first, any_second) => any_first - any_second
: (any_first, any_second) => any_second - any_first
);
};