Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8394412
es.typed-array.slice.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
982 B
Subscribers
None
es.typed-array.slice.js
View Options
'use strict'
;
var
ArrayBufferViewCore
=
require
(
'../internals/array-buffer-view-core'
);
var
speciesConstructor
=
require
(
'../internals/species-constructor'
);
var
fails
=
require
(
'../internals/fails'
);
var
aTypedArray
=
ArrayBufferViewCore
.
aTypedArray
;
var
aTypedArrayConstructor
=
ArrayBufferViewCore
.
aTypedArrayConstructor
;
var
exportTypedArrayMethod
=
ArrayBufferViewCore
.
exportTypedArrayMethod
;
var
$slice
=
[].
slice
;
var
FORCED
=
fails
(
function
()
{
/* global Int8Array -- safe */
new
Int8Array
(
1
).
slice
();
});
// `%TypedArray%.prototype.slice` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
exportTypedArrayMethod
(
'slice'
,
function
slice
(
start
,
end
)
{
var
list
=
$slice
.
call
(
aTypedArray
(
this
),
start
,
end
);
var
C
=
speciesConstructor
(
this
,
this
.
constructor
);
var
index
=
0
;
var
length
=
list
.
length
;
var
result
=
new
(
aTypedArrayConstructor
(
C
))(
length
);
while
(
length
>
index
)
result
[
index
]
=
list
[
index
++
];
return
result
;
},
FORCED
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 4, 7:24 PM (6 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3369619
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment