improve AST_ConciseMethod compression (#2202)
p(){return x;} ---> p:()=>x
Optimization subject to the `compress` option `arrows`.
This commit is contained in:
@@ -4,7 +4,11 @@ var assert = require("assert");
|
||||
describe("Object", function() {
|
||||
it("Should allow objects to have a methodDefinition as property", function() {
|
||||
var code = "var a = {test() {return true;}}";
|
||||
assert.equal(Uglify.minify(code).code, "var a={test(){return!0}};");
|
||||
assert.equal(Uglify.minify(code, {
|
||||
compress: {
|
||||
arrows: false
|
||||
}
|
||||
}).code, "var a={test(){return!0}};");
|
||||
});
|
||||
|
||||
it("Should not allow objects to use static keywords like in classes", function() {
|
||||
|
||||
Reference in New Issue
Block a user