Sha256: daa618bf65cbaed2d19fd0c21ec33faf170cdb3c7738faf868eebe8ec49f865e

Contents?: true

Size: 816 Bytes

Versions: 3

Compression:

Stored size: 816 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 = {
  group: "builtin-trailing"
};

exports.metadata = metadata;
var MemberExpression = {
  exit: function exit(node) {
    var prop = node.property;
    if (!node.computed && t.isIdentifier(prop) && !t.isValidIdentifier(prop.name)) {
      // foo.default -> foo["default"]
      node.property = t.literal(prop.name);
      node.computed = true;
    }
  }
};
exports.MemberExpression = MemberExpression;

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gulp_assets-1.0.0.pre.5 template/node_modules/babel-core/lib/babel/transformation/transformers/es3/member-expression-literals.js
gulp_assets-1.0.0.pre.4 template/node_modules/babel-core/lib/babel/transformation/transformers/es3/member-expression-literals.js
gulp_assets-1.0.0.pre.3 template/node_modules/babel-core/lib/babel/transformation/transformers/es3/member-expression-literals.js