main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
672 bytes
|
Line | |
---|
1 | ;
|
---|
2 | exports.getImportSource = function ({
|
---|
3 | node
|
---|
4 | }) {
|
---|
5 | if (node.specifiers.length === 0) return node.source.value;
|
---|
6 | };
|
---|
7 | exports.getRequireSource = function ({
|
---|
8 | node
|
---|
9 | }) {
|
---|
10 | if (node.type !== "ExpressionStatement") return;
|
---|
11 | const {
|
---|
12 | expression
|
---|
13 | } = node;
|
---|
14 | if (expression.type === "CallExpression" && expression.callee.type === "Identifier" && expression.callee.name === "require" && expression.arguments.length === 1 && expression.arguments[0].type === "StringLiteral") {
|
---|
15 | return expression.arguments[0].value;
|
---|
16 | }
|
---|
17 | };
|
---|
18 | exports.isPolyfillSource = function (source) {
|
---|
19 | return source === "@babel/polyfill" || source === "core-js";
|
---|
20 | };
|
---|
21 |
|
---|
22 | //# sourceMappingURL=utils.cjs.map
|
---|
Note:
See
TracBrowser
for help on using the repository browser.