Here you can find the source of Inherits(parent)
Object.prototype.Inherits = function(parent) { if(arguments.length > 1) { parent.apply(this, Array.prototype.slice.call(arguments, 1) ); } else { //from w w w . ja v a 2 s . com parent.call(this); } };
Function.prototype.inheritsFrom = function(parent){ this.prototype = new parent(); this.prototype.constructor = this; this.prototype.parent = parent.prototype; return this; };
Function.prototype.Inherits = function(parent) {
this.prototype = new parent();
this.prototype.constructor = this;
this.prototype.parent = parent.prototype;
};
Function.prototype.inherit = function(ParentClass) {
this.prototype = Object.create(ParentClass.prototype);
this.prototype.constructor = this;
this.prototype.parent = ParentClass.prototype;
Function.prototype.__extends = function(parent) {
this.prototype = Object.create(parent.prototype);
};
Function.prototype.__extends = function(superClass) { this.prototype = Object.create(superClass.prototype); }; Object._entries = function(obj) { var entry = []; for (key in obj) entry[entry.length] = [key, obj[key]]; return entry; }; ...
Object.prototype.extend = function(){ var Obj = function(){}; Obj.prototype = this; return new Obj();
Object.extend = function(destination, source) { for (var property in source) { if (source.hasOwnProperty(property)) { destination[property] = source[property]; return destination; };
Object.extend = function(destination, source) { for (var property in source) { if (source.hasOwnProperty(property)) { destination[property] = source[property]; return destination;
Object.prototype.extend = function(obj) { for (var i in obj) { if (obj.hasOwnProperty(i)) { this[i] = obj[i]; }; Array.prototype.first = function() { return this.length && this[0]; ...