Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99542496
interopRequireWildcard.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jan 25, 07:33
Size
1 KB
Mime Type
text/x-java
Expires
Mon, Jan 27, 07:33 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23797959
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
interopRequireWildcard.js
View Options
import
_typeof
from
"@babel/runtime/helpers/esm/typeof"
;
function
_getRequireWildcardCache
()
{
if
(
typeof
WeakMap
!==
"function"
)
return
null
;
var
cache
=
new
WeakMap
();
_getRequireWildcardCache
=
function
_getRequireWildcardCache
()
{
return
cache
;
};
return
cache
;
}
export
default
function
_interopRequireWildcard
(
obj
)
{
if
(
obj
&&
obj
.
__esModule
)
{
return
obj
;
}
if
(
obj
===
null
||
_typeof
(
obj
)
!==
"object"
&&
typeof
obj
!==
"function"
)
{
return
{
"default"
:
obj
};
}
var
cache
=
_getRequireWildcardCache
();
if
(
cache
&&
cache
.
has
(
obj
))
{
return
cache
.
get
(
obj
);
}
var
newObj
=
{};
var
hasPropertyDescriptor
=
Object
.
defineProperty
&&
Object
.
getOwnPropertyDescriptor
;
for
(
var
key
in
obj
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
key
))
{
var
desc
=
hasPropertyDescriptor
?
Object
.
getOwnPropertyDescriptor
(
obj
,
key
)
:
null
;
if
(
desc
&&
(
desc
.
get
||
desc
.
set
))
{
Object
.
defineProperty
(
newObj
,
key
,
desc
);
}
else
{
newObj
[
key
]
=
obj
[
key
];
}
}
}
newObj
[
"default"
]
=
obj
;
if
(
cache
)
{
cache
.
set
(
obj
,
newObj
);
}
return
newObj
;
}
Event Timeline
Log In to Comment