Skip to content

Instantly share code, notes, and snippets.

@renatoargh
Created June 30, 2012 05:19
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 renatoargh/3022433 to your computer and use it in GitHub Desktop.
Save renatoargh/3022433 to your computer and use it in GitHub Desktop.
var objectCreate = function(arg){
if (!arg) { return {}; }
function obj() {};
obj.prototype = arg;
return new obj;
};
Object.create = Object.create || objectCreate;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment