Skip to content

Instantly share code, notes, and snippets.

@thynctank
thynctank / genetics.js
Created June 30, 2010 03:53
collection of methods for inheriting/mutating/splicing functionality
Genetics = {
top: window,
// builds a descendant object
// overridden functions get wrapped with this._super prop pointing to base func
// inherits prototype chain
originate: function(name, def) {
var top = Genetics.top;
top[name] = def.init;
delete def.init;
top[name].prototype = def;