dm

API Docs for: 0.5.1
Show:

DM Class

Defined in: dm.js:600
Module: dm

Main library wrapper

Item Index

Methods

Methods

add

(
  • name
  • callback
  • dependency
)
Number static

Defined in dm.js:734

Declare DM module

Parameters:

  • name String
    • name of the module
  • callback Function?
    • the module body function
  • dependency Array.?
    • an array of modules names from which this depends

Returns:

Number:
  • UUID of the callback

after

(
  • name
  • callback
  • weight
)
Number static

Defined in dm.js:785

Declare the callback succeeding the module body function

Parameters:

  • name String
    • name of the module
  • callback Function
    • the module succeeding function
  • weight Number?
    • the weight of the callback (lower have the higher priority)

Returns:

Number:
  • UUID of the callback

before

(
  • name
  • callback
  • weight
)
Number static

Defined in dm.js:762

Declare the callback preceding the module body function

If the module weren't created by DM.add: new module (without the body) will be created implicitly

Parameters:

  • name String
    • name of the module
  • callback Function
    • the module preceding function
  • weight Number?
    • the weight of the callback (lower have the higher priority)

Returns:

Number:
  • UUID of the callback

config

(
  • cfg
  • value
)
String? static

Defined in dm.js:962

Configuration getter/getter

Currently available configuration keys: attr, prefix

  • Getting the current value, call this with the only one string parameter: name of the configuration property
  • Set the single value DM.config(string_name, string_value)
  • Set any number of values DM.config(Object.<key:value>)

Parameters:

  • cfg String | Object
  • value String?

Returns:

String?:
  • current configuration value (`DM.config(string_value)

detach

(
  • uuid
)
DM static chainable

Defined in dm.js:872

Detach the callback

Parameters:

  • uuid Number
    • UUID of the callback

Returns:

DM:

go

() DM static chainable

Defined in dm.js:806

Initiate callbacks execution

Returns:

DM:

remove

(
  • name
)
DM static chainable

Defined in dm.js:933

Remove module from registry

Parameters:

  • name String
    • module name

Returns:

DM:

removeAll

() DM static chainable

Defined in dm.js:949

Remove all modules from registry

Returns:

DM:

resetConfig

() DM static chainable

Defined in dm.js:1002

Revert inner configuration to default values

Returns:

DM: