Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124035
es.array.flat-map.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
803 B
Subscribers
None
es.array.flat-map.js
View Options
'use strict'
;
var
$
=
require
(
'../internals/export'
);
var
flattenIntoArray
=
require
(
'../internals/flatten-into-array'
);
var
toObject
=
require
(
'../internals/to-object'
);
var
toLength
=
require
(
'../internals/to-length'
);
var
aFunction
=
require
(
'../internals/a-function'
);
var
arraySpeciesCreate
=
require
(
'../internals/array-species-create'
);
// `Array.prototype.flatMap` method
// https://github.com/tc39/proposal-flatMap
$
({
target
:
'Array'
,
proto
:
true
},
{
flatMap
:
function
flatMap
(
callbackfn
/* , thisArg */
)
{
var
O
=
toObject
(
this
);
var
sourceLen
=
toLength
(
O
.
length
);
var
A
;
aFunction
(
callbackfn
);
A
=
arraySpeciesCreate
(
O
,
0
);
A
.
length
=
flattenIntoArray
(
A
,
O
,
O
,
sourceLen
,
0
,
1
,
callbackfn
,
arguments
.
length
>
1
?
arguments
[
1
]
:
undefined
);
return
A
;
}
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 21, 6:35 PM (2 w, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3364742
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment