Merge branch 'ctor-spread-speedup' of https://github.com/RReverser/6to5

This commit is contained in:
Sebastian McKenzie 2014-11-22 23:28:06 +11:00
commit 71aed8b269

View File

@ -1,5 +1,5 @@
(function (Constructor, args) {
var bindArgs = [null].concat(args);
var Factory = Constructor.bind.apply(Constructor, bindArgs);
return new Factory;
var instance = Object.create(Constructor.prototype);
Constructor.apply(instance, args);
return instance;
});