babel/lib/6to5/transformation/transformers/es6-property-name-shorthand.js

9 lines
207 B
JavaScript

var t = require("../../types");
var _ = require("lodash");
exports.Property = function (node) {
if (!node.shorthand) return;
node.shorthand = false;
node.key = t.removeComments(_.clone(node.key));
};