.extend like inheritance helper for Node.js
You basically got two options:
// 1. Extend from the blank classvar Base = ;var Sub = Base;// 2. Add the .extend helper to a classMyClassextend = extend;
.extend allow you to assign prototype and static methods.
constructor method is assigned, the parent constructor method will be called by default.
// Extend a classvar Sub = Parent;Sub;// LOG: heyvar instance = ;instance;// LOG: hello
Sub classes are assigned a
__super__ static property pointing to their parent prototype.
var Sub = Parent;;
Copyright (c) 2013 Simon Boudrias
Licensed under the MIT license.