Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9349017
es.object.seal.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
641 B
Subscribers
None
es.object.seal.js
View Options
var
$
=
require
(
'../internals/export'
);
var
isObject
=
require
(
'../internals/is-object'
);
var
onFreeze
=
require
(
'../internals/internal-metadata'
).
onFreeze
;
var
FREEZING
=
require
(
'../internals/freezing'
);
var
fails
=
require
(
'../internals/fails'
);
// eslint-disable-next-line es-x/no-object-seal -- safe
var
$seal
=
Object
.
seal
;
var
FAILS_ON_PRIMITIVES
=
fails
(
function
()
{
$seal
(
1
);
});
// `Object.seal` method
// https://tc39.es/ecma262/#sec-object.seal
$
({
target
:
'Object'
,
stat
:
true
,
forced
:
FAILS_ON_PRIMITIVES
,
sham
:
!
FREEZING
},
{
seal
:
function
seal
(
it
)
{
return
$seal
&&
isObject
(
it
)
?
$seal
(
onFreeze
(
it
))
:
it
;
}
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 4 2025, 7:01 PM (6 w, 17 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3298729
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment