DM Class
Main library wrapper
Item Index
Methods
add
(
Number
static
-
name -
callback -
dependency
Declare DM module
Parameters:
-
nameString- name of the module
-
callbackFunction?- the module body function
-
dependencyArray.? - an array of modules names from which this depends
Returns:
Number:
- UUID of the callback
after
(
Number
static
-
name -
callback -
weight
Declare the callback succeeding the module body function
Parameters:
-
nameString- name of the module
-
callbackFunction- the module succeeding function
-
weightNumber?- the weight of the callback (lower have the higher priority)
Returns:
Number:
- UUID of the callback
before
(
Number
static
-
name -
callback -
weight
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:
-
nameString- name of the module
-
callbackFunction- the module preceding function
-
weightNumber?- the weight of the callback (lower have the higher priority)
Returns:
Number:
- UUID of the callback
config
(
String?
static
-
cfg -
value
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:
-
cfgString | Object -
valueString?
Returns:
String?:
- current configuration value (`DM.config(string_value)
detach
(
DM
static
chainable
-
uuid
Detach the callback
Parameters:
-
uuidNumber- UUID of the callback
Returns:
DM: