DCL

An elegant OOP with mixins + AOP for JavaScript.

mini.js

Version 1.x

mini.js is a minimal kernel of dcl. It implements OOP facilities for single and multiple inheritance using mixins, and super calls. Additionally it provides useful utilities to work with objects.

There is a drop-in replacement for mini.js (added in dcl 1.1.0), which supports legacy browsers (tested with IE8): legacy.js. It has the same API, and the same functionality. While it can be used instead of mini.js on modern browsers, it is not recommended, because legacy.js is slower than mini.js.

mini.js module can be included with following commands:

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

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

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

Module API

The return value of this module is a function, which is called dcl() in this documentation.

dcl() is the main “class” composition engine. While it is important by itself, it hosts a number of public properties.

Main properties:

Utilities:

Auxiliary properties: