Skip to content

Instantly share code, notes, and snippets.

@vladocar
Created June 21, 2011 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vladocar/1036934 to your computer and use it in GitHub Desktop.
Save vladocar/1036934 to your computer and use it in GitHub Desktop.
Multi extend object
function extend() {
var i = arguments.length;
function F() {}
while (i--) {
for (var m in arguments[i]) {
F.prototype[m] = arguments[i][m];
}
}
return new F();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment