diff --git a/lib/class.js b/lib/class.js index 1760911..6883851 100644 --- a/lib/class.js +++ b/lib/class.js @@ -182,7 +182,7 @@ function extend() prototype.parent = base.prototype; // set up the new class - attach_extend( new_class ); + setup_props( new_class ); new_class.prototype = prototype; new_class.constructor = new_class; @@ -191,11 +191,24 @@ function extend() /** - * Attaches extend method to the given function's prototype + * Sets up common properties for the provided function (class) * - * @param {Function} func function to attach method to + * @param {Function} func function (class) to attach properties to * - * @return undefined + * @return {undefined} + */ +function setup_props( func ) +{ + attach_extend( func ); +} + + +/** + * Attaches extend method to the given function (class) + * + * @param {Function} func function (class) to attach method to + * + * @return {undefined} */ function attach_extend( func ) {