18 lines
424 B
JavaScript
18 lines
424 B
JavaScript
"use strict";
|
|
|
|
var nameMethod = require("../../helpers/name-method");
|
|
var t = require("../../../types");
|
|
var _ = require("lodash");
|
|
|
|
exports.Property = function (node, parent, scope, context, file) {
|
|
if (node.method) {
|
|
node.method = false;
|
|
nameMethod.property(node, file, scope);
|
|
}
|
|
|
|
if (node.shorthand) {
|
|
node.shorthand = false;
|
|
node.key = t.removeComments(_.clone(node.key));
|
|
}
|
|
};
|