new-operator

the new operator as a function

new-operator

the new operator as a function

This new inherits the first-class nature of functions, allowing you to do a couple of cool things that you never could with new. That also gets you .apply(), even for native constructors.

npm install new-operator

var new_ = require('new-operator')