The {}
literal form is a more concise way of creating an object.
There is no performance difference.
Apply with the Grit CLI
grit apply no_new_object
Object constructors to literal syntax
BEFORE
var myObject = new Object();
AFTER
var myObject = {};
Don't change object constructors to literal syntax
JAVASCRIPT
var myObject = new CustomObject();
Don't change object constructors
JAVASCRIPT
var myObject = {};