DCL

An elegant OOP with mixins + AOP for JavaScript.

debug.js

Debuggability is one of the main concerns for any public library. It should provide a concise picture of produced, yet it should not affect size nor performance of said library.

debug.js is a debug helper for dcl. It augments dcl() with enhanced error reporting, and provides debugging helpers. This module was designed primarily to be used during development.

It can be included with following commands:

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

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

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

Module API

The return value of this module is an object, which is called dclDebug in this documentation.

Main property:

  • dclDebug.log() - logs class and/or object metainformation to console.log

General error object:

“Class” composition error:

Supercall and around advice errors:

Chaining errors:

Fork me on GitHub