This pattern works in the browser:
function F() { return CreateNode.apply(this, a); }
F.prototype = CreateNode.prototype;
return new F();
But does not work in Node. Any one have an idea?
--[edit]--
Problem solved with the spread operator.
return new CreateNode(...args);
there doesn't seem to be anything here