debian-mirror-gitlab/core-js/modules/es.typed-array.sort.js
2019-09-25 13:30:05 +05:30

11 lines
391 B
JavaScript

'use strict';
var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var $sort = [].sort;
// `%TypedArray%.prototype.sort` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort
ArrayBufferViewCore.exportProto('sort', function sort(comparefn) {
return $sort.call(aTypedArray(this), comparefn);
});