|
1 | 1 | 'use strict'; |
2 | 2 | var arrayWith = require('../internals/array-with'); |
3 | 3 | var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); |
4 | | -var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); |
5 | | -var toBigInt = require('../internals/to-big-int'); |
6 | | -var classof = require('../internals/classof'); |
7 | | -var uncurryThis = require('../internals/function-uncurry-this'); |
| 4 | +// var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); |
| 5 | +// var toBigInt = require('../internals/to-big-int'); |
| 6 | +// var classof = require('../internals/classof'); |
| 7 | +// var uncurryThis = require('../internals/function-uncurry-this'); |
8 | 8 |
|
9 | 9 | var aTypedArray = ArrayBufferViewCore.aTypedArray; |
10 | 10 | var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; |
11 | 11 | var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR; |
12 | | -var slice = uncurryThis(''.slice); |
| 12 | +// var slice = uncurryThis(''.slice); |
13 | 13 |
|
14 | 14 | // `%TypedArray%.prototype.with` method |
15 | 15 | // https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with |
16 | 16 | exportTypedArrayMethod('with', { 'with': function (index, value) { |
17 | | - aTypedArray(this); |
18 | | - var relativeIndex = toIntegerOrInfinity(index); |
19 | | - var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value; |
20 | | - return arrayWith(this, this[TYPED_ARRAY_CONSTRUCTOR], relativeIndex, actualValue); |
| 17 | + // aTypedArray(this); |
| 18 | + // var relativeIndex = toIntegerOrInfinity(index); |
| 19 | + // var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value; |
| 20 | + // return arrayWith(this, this[TYPED_ARRAY_CONSTRUCTOR], relativeIndex, actualValue); |
| 21 | + return arrayWith(aTypedArray(this), this[TYPED_ARRAY_CONSTRUCTOR], index, value); |
21 | 22 | } }['with']); |
0 commit comments