Class.extend
Backbone's .extend
like inheritance helper for Node.js
Usage
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()
.extend
allow you to assign prototype and static methods.
If no 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
.__super__
Sub classes are assigned a __super__
static property pointing to their parent prototype.
var Sub = Parent;;
License
Copyright (c) 2013 Simon Boudrias
Licensed under the MIT license.