Skip to content

Instantly share code, notes, and snippets.

@Havvy
Created May 6, 2013 01:00
Show Gist options
  • Save Havvy/5522791 to your computer and use it in GitHub Desktop.
Save Havvy/5522791 to your computer and use it in GitHub Desktop.
var constructor = function (ctor, args) {
return function ctor_thunk () {
var ret = ctor.apply(Object.create(ctor.prototype), args);
ret.constructor = ctor_thunk;
return ret;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment