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