main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = void 0;
|
---|
7 | var _helperCompilationTargets = require("@babel/helper-compilation-targets");
|
---|
8 | var _helperPluginUtils = require("@babel/helper-plugin-utils");
|
---|
9 | var _default = exports.default = (0, _helperPluginUtils.declare)(api => {
|
---|
10 | api.assertVersion(7);
|
---|
11 | const supportUnicodeId = !(0, _helperCompilationTargets.isRequired)("transform-unicode-escapes", api.targets());
|
---|
12 | return {
|
---|
13 | name: "transform-function-name",
|
---|
14 | visitor: {
|
---|
15 | FunctionExpression: {
|
---|
16 | exit(path) {
|
---|
17 | if (path.key !== "value" && !path.parentPath.isObjectProperty()) {
|
---|
18 | {
|
---|
19 | var _path$ensureFunctionN;
|
---|
20 | (_path$ensureFunctionN = path.ensureFunctionName) != null ? _path$ensureFunctionN : path.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
|
---|
21 | }
|
---|
22 | path.ensureFunctionName(supportUnicodeId);
|
---|
23 | }
|
---|
24 | }
|
---|
25 | },
|
---|
26 | ObjectProperty(path) {
|
---|
27 | const value = path.get("value");
|
---|
28 | if (value.isFunction()) {
|
---|
29 | {
|
---|
30 | var _value$ensureFunction;
|
---|
31 | (_value$ensureFunction = value.ensureFunctionName) != null ? _value$ensureFunction : value.ensureFunctionName = require("@babel/traverse").NodePath.prototype.ensureFunctionName;
|
---|
32 | }
|
---|
33 | value.ensureFunctionName(supportUnicodeId);
|
---|
34 | }
|
---|
35 | }
|
---|
36 | }
|
---|
37 | };
|
---|
38 | });
|
---|
39 |
|
---|
40 | //# sourceMappingURL=index.js.map
|
---|
Note:
See
TracBrowser
for help on using the repository browser.