Modify constructors to function without <code>new</code>.
create constructor functions that don't need to be called with
makes your code more safe and allows constructors to be used in more functional
contexts (such as
You can use it on a constructor while creating it:
var MyObject = newlessthissetSomethingsomething;;thissomething = value;;var instance = MyObject"Hello";instancesomething; // "Hello"
You can also use it with existing constructors from other libraries without disrupting them:
var Map = newlessgooglemapsMap;var map = MapdocumentgetElementById"map-canvas" options;// orvar User = newlessBackboneModelextend;var user = Username: "Jennifer";
Newless is open source software. It is (c) 2013-2015 Rob Brackett and licensed under
the BSD license. The full license text is in the