保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 9bdb95c9e34cef640534e5e5a1e2225a80442000
PAMapp/node_modules/core-js/modules/es.array.sort.js
@@ -1,5 +1,6 @@
'use strict';
var $ = require('../internals/export');
var uncurryThis = require('../internals/function-uncurry-this');
var aCallable = require('../internals/a-callable');
var toObject = require('../internals/to-object');
var lengthOfArrayLike = require('../internals/length-of-array-like');
@@ -13,7 +14,8 @@
var WEBKIT = require('../internals/engine-webkit-version');
var test = [];
var nativeSort = test.sort;
var un$Sort = uncurryThis(test.sort);
var push = uncurryThis(test.push);
// IE8-
var FAILS_ON_UNDEFINED = fails(function () {
@@ -80,17 +82,18 @@
    var array = toObject(this);
    if (STABLE_SORT) return comparefn === undefined ? nativeSort.call(array) : nativeSort.call(array, comparefn);
    if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
    var items = [];
    var arrayLength = lengthOfArrayLike(array);
    var itemsLength, index;
    for (index = 0; index < arrayLength; index++) {
      if (index in array) items.push(array[index]);
      if (index in array) push(items, array[index]);
    }
    items = internalSort(items, getSortCompare(comparefn));
    internalSort(items, getSortCompare(comparefn));
    itemsLength = items.length;
    index = 0;