DCL

An elegant OOP with mixins + AOP for JavaScript.

inherited.js

inherited.js is a dynamic dispatcher of supercalls. It augments dcl(), and adds inherited() method to all newly created objects.

All facilities of inherited.js work in strict mode too.

It can be included with following commands:

Include inherited
1
2
3
4
5
6
7
8
9
10
11
12
13
// node.js
var inherited = require("dcl/inherited");
...

// AMD (code)
require(["dcl/inherited"], function(inherited){
  ...
});

// AMD (definition)
define(["dcl/inherited"], function(inherited){
  ...
});

Module API

The return value of this module is a function, which is called inherited() in this documentation. Note that the module value itself is usually not used directly, because all principal functions are automatically mixed in an instance as methods.

inherited() is a dynamic dispatcher of supercalls, and the main function of the module. The same function is mixed in all newly created objects as inherited, and exposed publicly as dcl.inherited(). Additionally it hosts some public properties.

Main properties:

Fork me on GitHub