Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9340090
add-to-unscopables.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
654 B
Subscribers
None
add-to-unscopables.js
View Options
var
wellKnownSymbol
=
require
(
'../internals/well-known-symbol'
);
var
create
=
require
(
'../internals/object-create'
);
var
defineProperty
=
require
(
'../internals/object-define-property'
).
f
;
var
UNSCOPABLES
=
wellKnownSymbol
(
'unscopables'
);
var
ArrayPrototype
=
Array
.
prototype
;
// Array.prototype[@@unscopables]
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
if
(
ArrayPrototype
[
UNSCOPABLES
]
==
undefined
)
{
defineProperty
(
ArrayPrototype
,
UNSCOPABLES
,
{
configurable
:
true
,
value
:
create
(
null
)
});
}
// add a key to Array.prototype[@@unscopables]
module
.
exports
=
function
(
key
)
{
ArrayPrototype
[
UNSCOPABLES
][
key
]
=
true
;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 4 2025, 10:13 AM (5 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3348433
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment