Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
673 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = void 0;
|
---|
7 |
|
---|
8 | var _helperPluginUtils = require("@babel/helper-plugin-utils");
|
---|
9 |
|
---|
10 | var _default = (0, _helperPluginUtils.declare)(api => {
|
---|
11 | api.assertVersion(7);
|
---|
12 | return {
|
---|
13 | name: "transform-literals",
|
---|
14 | visitor: {
|
---|
15 | NumericLiteral({
|
---|
16 | node
|
---|
17 | }) {
|
---|
18 | if (node.extra && /^0[ob]/i.test(node.extra.raw)) {
|
---|
19 | node.extra = undefined;
|
---|
20 | }
|
---|
21 | },
|
---|
22 |
|
---|
23 | StringLiteral({
|
---|
24 | node
|
---|
25 | }) {
|
---|
26 | if (node.extra && /\\[u]/gi.test(node.extra.raw)) {
|
---|
27 | node.extra = undefined;
|
---|
28 | }
|
---|
29 | }
|
---|
30 |
|
---|
31 | }
|
---|
32 | };
|
---|
33 | });
|
---|
34 |
|
---|
35 | exports.default = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.