Skip to content

Instantly share code, notes, and snippets.

@Wizek
Created May 21, 2011 03:41
Show Gist options
  • Save Wizek/984218 to your computer and use it in GitHub Desktop.
Save Wizek/984218 to your computer and use it in GitHub Desktop.
Object.defineProperty(Object.prototype, '_proto',
{ enumerable: false
, writable: true
, value: function(name, fn) {
Object.defineProperty( this.prototype, name,
{ enumerable: false
, writable: true
, value: fn } )
}
}
)
Object._proto('extended', function() {})
// v2: Can I haz something simmilar tho this:
Object._proto.extended = function() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment