Sha256: 52f847e493ca9e035a983c01bbf09c0afa800968a9851e195edf36054bb37da1
Contents?: true
Size: 820 Bytes
Versions: 8
Compression:
Stored size: 820 Bytes
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = function (_ref) { var Plugin = _ref.Plugin; var parse = _ref.parse; var traverse = _ref.traverse; return new Plugin("eval", { metadata: { group: "builtin-pre" }, visitor: { CallExpression: function CallExpression(node) { if (this.get("callee").isIdentifier({ name: "eval" }) && node.arguments.length === 1) { var evaluate = this.get("arguments")[0].evaluate(); if (!evaluate.confident) return; var code = evaluate.value; if (typeof code !== "string") return; var ast = parse(code); traverse.removeProperties(ast); return ast.program; } } } }); }; module.exports = exports["default"];
Version data entries
8 entries across 8 versions & 3 rubygems