care-js
Version:
Standard library
12 lines (9 loc) • 391 B
JavaScript
;
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);
});