Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8390864
define-built-in.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
805 B
Subscribers
None
define-built-in.js
View Options
var
isCallable
=
require
(
'../internals/is-callable'
);
var
createNonEnumerableProperty
=
require
(
'../internals/create-non-enumerable-property'
);
var
makeBuiltIn
=
require
(
'../internals/make-built-in'
);
var
defineGlobalProperty
=
require
(
'../internals/define-global-property'
);
module
.
exports
=
function
(
O
,
key
,
value
,
options
)
{
if
(
!
options
)
options
=
{};
var
simple
=
options
.
enumerable
;
var
name
=
options
.
name
!==
undefined
?
options
.
name
:
key
;
if
(
isCallable
(
value
))
makeBuiltIn
(
value
,
name
,
options
);
if
(
options
.
global
)
{
if
(
simple
)
O
[
key
]
=
value
;
else
defineGlobalProperty
(
key
,
value
);
}
else
{
if
(
!
options
.
unsafe
)
delete
O
[
key
];
else
if
(
O
[
key
])
simple
=
true
;
if
(
simple
)
O
[
key
]
=
value
;
else
createNonEnumerableProperty
(
O
,
key
,
value
);
}
return
O
;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 6:36 PM (14 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3376985
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment