11 lines
234 B
JavaScript
11 lines
234 B
JavaScript
|
/* Class utilities */
|
||
|
var classes = {
|
||
|
subclass: function(child, parent) {
|
||
|
function ctor() { this.constructor = child; }
|
||
|
ctor.prototype = parent.prototype;
|
||
|
child.prototype = new ctor();
|
||
|
},
|
||
|
};
|
||
|
|
||
|
module.exports = classes;
|