/**
 * Heir v1.0.1 - http://git.io/F87mKg
 * Oliver Caldwell
 * MIT license
 */

(function () {
	/*global define,module*/
	'use strict';

	var heir = {
		/**
		 * Causes your desired class to inherit from a source class. This uses
		 * prototypical inheritance so you can override methods without ruining
		 * the parent class.
		 *
		 * This will alter the actual destination class though, it does not
		 * create a new class.
		 *
		 * @param {Function} destination The target class for the inheritance.
		 * @param {Function} source Class to inherit from.
		 */
		inherit: function inherit(destination, source) {
			destination.prototype = heir.createObject(source.prototype);
			destination.prototype.constructor = destination;
		},

		/**
		 * Creates a new object with the source object nestled within its
		 * prototype chain.
		 *
		 * @param {Object} source Method to insert into the new object's prototype.
		 * @return {Object} An empty object with the source object in it's prototype chain.
		 */
		createObject: Object.create || function createObject(source) {
			var Host = function () {};
			Host.prototype = source;
			return new Host();
		},

		/**
		 * Mixes the specified object into your class. This can be used to add
		 * certain capabilities and helper methods to a class that is already
		 * inheriting from some other class. You can mix in as many object as
		 * you want, but only inherit from one.
		 *
		 * These values are mixed into the actual prototype object of your
		 * class, they are not added to the prototype chain like inherit.
		 *
		 * @param {Function} destination Class to mix the object into.
		 * @param {Object} source Object to mix into the class.
		 */
		mixin: function mixin(destination, source) {
			var key;
			var destinationPrototype = destination.prototype;

			for (key in source) {
				if (source.hasOwnProperty(key)) {
					destinationPrototype[key] = source[key];
				}
			}
		}
	};

	if (typeof define === 'function' && define.amd) {
		define(heir);
	}
	else if (typeof module === 'object' && module.exports) {
		module.exports = heir;
	}
	else {
		this.heir = heir;
	}
}.call(this));
@@ -1748,190 +1748,905 @@
 %0A%09%09%09
-var key;%0A%09%09%09var destinationPrototype = destination.prototype;%0A%0A%09%09%09for (key in source) %7B%0A%09%09%09%09if (source.hasOwnProperty(key)) %7B%0A%09%09%09%09%09destinationPrototype%5Bkey%5D = source%5Bkey%5D;%0A%09%09%09%09%7D%0A%09%09%09%7D
+return heir.merge(destination.prototype, source);%0A%09%09%7D,%0A%0A%09%09/**%0A%09%09 * This function merges a source into a destination.%0A%09%09 *%0A%09%09 * @param %7BObject%7D destination The destination for the merge%0A%09%09 * @param %7BObject%7D source%09  The source of the properties to merge%0A%09%09 */%0A%09%09merge: function merge(destination, source) %7B%0A%09%09%09var key;%0A%0A%09%09%09for (key in source) %7B%0A%09%09%09%09if (heir.hasOwn(source, key)) %7B%0A%09%09%09%09%09destination%5Bkey%5D = source;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D,%0A%0A%09%09/**%0A%09%09 * Shortcut for Object.prototype.hasOwnProperty.%0A%09%09 *%0A%09%09 * We should use Object.prototype.hasOwnPropety rather than%0A%09%09 * object.hasOwnProperty as it could be overwritten. %0A%09%09 * %0A%09%09 * @param  %7BObject%7D%09%09 object The object to check%0A%09%09 * @param  %7BString%7CNumber%7D  key%09The key to check for.%0A%09%09 * @return %7BBoolean%7D%09%09%09   Does object have key as an own propety?%0A%09%09 */%0A%09%09hasOwn: function hasOwn(object, key) %7B%0A%09%09%09return Object.prototype.hasOwnProperty.call(object, key);
 %0A%09%09%7D
@@ -2852,8 +2852,9 @@
 (this));
+%0A

Add a more general purpose "merge" method.