src/javascript/core/utils/Basic.js
function inherit(child, parent) {
		// copy over all parent properties
		for (var key in parent) {
			if ({}.hasOwnProperty.call(parent, key)) {
				child[key] = parent[key];
			}
		}

		// give child `class` a place to define its own methods
		function ctor() {
			this.constructor = child;

			if (MXI_DEBUG) {
				var getCtorName = function(fn) {
					var m = fn.toString().match(/^function\s([^\(\s]+)/);
					return m ? m[1] : false;
				};

				this.ctorName = getCtorName(child);
			}
		}
		ctor.prototype = parent.prototype;
		child.prototype = new ctor();

		// keep a way to reference parent methods
		child.parent = parent.prototype;
		return child;
	}
function inherit(child, parent) {
		// copy over all parent properties
		for (var key in parent) {
			if ({}.hasOwnProperty.call(parent, key)) {
				child[key] = parent[key];
			}
		}

		// give child `class` a place to define its own methods
		function ctor() {
			this.constructor = child;

			if (MXI_DEBUG) {
				var getCtorName = function(fn) {
					var m = fn.toString().match(/^function\s([^\(\s]+)/);
					return m ? m[1] : false;
				};

				this.ctorName = getCtorName(child);
			}
		}
		ctor.prototype = parent.prototype;
		child.prototype = new ctor();

		// keep a way to reference parent methods
		child.parent = parent.prototype;
		return child;
	}
A way to inherit one `class` from another in a consisstent way (more or less)

@method inherit
@static
@since >1.4.1
@param {Function} child
@param {Function} parent
@return {Function} Prepared constructor