add property name shorthand support

This commit is contained in:
Sebastian McKenzie 2014-09-29 03:43:10 +10:00
parent d11944f7c1
commit d87c7942a3
7 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,3 @@
exports.Property = function (node) {
if (node.shorthand) node.shorthand = false;
};

View File

@ -0,0 +1 @@
var coords = { x, y, foo: "bar" };

View File

@ -0,0 +1,5 @@
var coords = {
x: x,
y: y,
foo: "bar"
};

View File

@ -0,0 +1 @@
var coords = { x, y };

View File

@ -0,0 +1,4 @@
var coords = {
x: x,
y: y
};

View File

@ -0,0 +1 @@
var coords = { x };

View File

@ -0,0 +1,3 @@
var coords = {
x: x
};