Sha256: 854e4646cc3febc55528db5120b991e5dd08eb463d9d401d5a92b0aeb72e1afa
Contents?: true
Size: 827 Bytes
Versions: 3
Compression:
Stored size: 827 Bytes
Contents
"use strict"; exports.__esModule = true; function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } } var _types = require("../../../types"); var t = _interopRequireWildcard(_types); var metadata = { optional: true, group: "builtin-trailing" }; exports.metadata = metadata; var MemberExpression = { exit: function exit(node) { var prop = node.property; if (node.computed && t.isLiteral(prop) && t.isValidIdentifier(prop.value)) { // foo["bar"] => foo.bar node.property = t.identifier(prop.value); node.computed = false; } } }; exports.MemberExpression = MemberExpression;
Version data entries
3 entries across 3 versions & 1 rubygems