source: imaps-frontend/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 641 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = rewriteThis;
7var _core = require("@babel/core");
8var _traverse = require("@babel/traverse");
9let rewriteThisVisitor;
10function rewriteThis(programPath) {
11 if (!rewriteThisVisitor) {
12 rewriteThisVisitor = _traverse.visitors.environmentVisitor({
13 ThisExpression(path) {
14 path.replaceWith(_core.types.unaryExpression("void", _core.types.numericLiteral(0), true));
15 }
16 });
17 rewriteThisVisitor.noScope = true;
18 }
19 (0, _traverse.default)(programPath.node, rewriteThisVisitor);
20}
21
22//# sourceMappingURL=rewrite-this.js.map
Note: See TracBrowser for help on using the repository browser.