Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99431354
index.mjs
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
Fri, Jan 24, 12:34
Size
1 KB
Mime Type
text/x-java
Expires
Sun, Jan 26, 12:34 (2 d)
Engine
blob
Format
Raw Data
Handle
23794509
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
index.mjs
View Options
import defineProvider from '@babel/helper-define-polyfill-provider';
const runtimeCompat = "#__secret_key__@babel/runtime__compatibility";
var index = defineProvider(({
debug,
targets,
babel
}, options) => {
if (!shallowEqual(targets, babel.targets())) {
throw new Error("This plugin does not use the targets option. Only preset-env's targets" + " or top-level targets need to be configured for this plugin to work." + " See https://github.com/babel/babel-polyfills/issues/36 for more" + " details.");
}
const {
[runtimeCompat]: {
useBabelRuntime
} = {
useBabelRuntime: ""
}
} = options;
const pureName = useBabelRuntime ? `${useBabelRuntime}/regenerator` : "regenerator-runtime";
return {
name: "regenerator",
polyfills: ["regenerator-runtime"],
usageGlobal(meta, utils) {
if (isRegenerator(meta)) {
debug("regenerator-runtime");
utils.injectGlobalImport("regenerator-runtime/runtime.js");
}
},
usagePure(meta, utils, path) {
if (isRegenerator(meta)) {
path.replaceWith(utils.injectDefaultImport(pureName, "regenerator-runtime"));
}
}
};
});
const isRegenerator = meta => meta.kind === "global" && meta.name === "regeneratorRuntime";
function shallowEqual(obj1, obj2) {
return JSON.stringify(obj1) === JSON.stringify(obj2);
}
export default index;
//# sourceMappingURL=index.mjs.map
Event Timeline
Log In to Comment