// Inheritance utility (see: http://coffeescript.org/#try:class%20A%0Aclass%20B%20extends%20A) function inherit(child, parent) { // shallow copy own properties for (var key in parent) { if (parent.hasOwnProperty(key)) { child[key] = parent[key]; } } function ctor() {this.constructor = child;} ctor.prototype = parent.prototype; child.prototype = new ctor(); child.uber = parent.prototype; // keep a reference to parent's prototype into child.uber return child; }; // Exports this.inherit = inherit; if (typeof module !== "undefined" && module !== null) { module.exports = this.inherit; }