UNPKG

babel-plugin-mini

Version:
25 lines (20 loc) 648 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (babel) { return new babel.Transformer('module_name', { Program: function Program(node) {}, Class: function Class(node, parent, scope) {}, NewExpression: function NewExpression(node, parent, scope) {}, CallExpression: function CallExpression(node, parent, scope) {}, MethodDefinition: function MethodDefinition(node, parent, scope) {}, visitor: { StringLiteral: function StringLiteral(path) { if (path.node.value === 'Hello') { path.node.value = 'World'; } } } }); };