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.
20 lines
672 B
20 lines
672 B
'use strict'; |
|
var ArrayBufferViewCore = require('../internals/array-buffer-view-core'); |
|
var call = require('../internals/function-call'); |
|
var $fill = require('../internals/array-fill'); |
|
|
|
var aTypedArray = ArrayBufferViewCore.aTypedArray; |
|
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; |
|
|
|
// `%TypedArray%.prototype.fill` method |
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill |
|
exportTypedArrayMethod('fill', function fill(value /* , start, end */) { |
|
var length = arguments.length; |
|
return call( |
|
$fill, |
|
aTypedArray(this), |
|
value, |
|
length > 1 ? arguments[1] : undefined, |
|
length > 2 ? arguments[2] : undefined |
|
); |
|
});
|
|
|