You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
635 B
13 lines
635 B
'use strict'; |
|
var arrayToReversed = require('../internals/array-to-reversed'); |
|
var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); |
|
|
|
var aTypedArray = ArrayBufferViewCore.aTypedArray; |
|
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; |
|
var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR; |
|
|
|
// `%TypedArray%.prototype.toReversed` method |
|
// https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed |
|
exportTypedArrayMethod('toReversed', function toReversed() { |
|
return arrayToReversed(aTypedArray(this), this[TYPED_ARRAY_CONSTRUCTOR]); |
|
}, true);
|
|
|