new System()
The application's event emitter for core functionality which allows for some point to multi-point calls
and `skeleton` to `app` functionality.
N.B. This is not the same `system` referenced by instances. See InstanceSystem.
Extends
- EventEmitter
Type Definitions
-
config_get-callback(value)
-
Callback for the `config_get` call
Parameters:
Name Type Description value
boolean | number | string the value pairs -
config_object-callback(config)
-
Callback for the `config_object` call
Parameters:
Name Type Description config
Object.<string, (boolean|number|string)> the key/value pairs -
get_userconfig-callback(userconfig)
-
Callback for the `get_userconfig` call
Parameters:
Name Type Description userconfig
Object.<string, (boolean|number|string)> the key/value pairs
Events
-
config_get
-
Retrieve a value from the config database
Parameters:
Name Type Description key
string the key to retrieve cb
System~config_get-callback the callback function to accept the value -
config_object
-
Retrieve the config database
Parameters:
Name Type Description cb
System~config_object-callback the callback function to accept the object -
config_set
-
Save/update a key/value pair to the database
Parameters:
Name Type Description key
number | string the key to save under value
boolean | number | string the object to save -
get_userconfig
-
Retrieve the user config properties
Parameters:
Name Type Description cb
System~get_userconfig-callback the callback function to accept the object -
set_userconfig_key
-
Accepts an updated user config key/value pair to determine if the module's state needs to change
Parameters:
Name Type Description key
string the key value
boolean | number | string the updated object