A list of all the parameters that can be specified when creating a utility instance.
- horizontalPosition
- verticalPosition
- maxWidth
- maxHeight
- fontSize
- showClearTitle
- showOutputDirection
- allowColorization
- consoleColorScheme
- popupColorScheme
- serverColorScheme
- consoleEOL
- tabChar
- decimalPlaces
- run
Parameters must be passed through the object, for example:
const UduJS = require('udujs/Client');
const Debug = new UduJS({
maxWidth: 'auto',
fontSize: '1.2em',
decimalPlaces: 4,
popupColorScheme: 'dark',
});
Horizontal position of pop-up message on the browser window.
Valid values are left
or right
.
The default value is left
.
const Debug = new UduJS({
horizontalPosition: 'right',
});
Vertical position of pop-up message on the browser window.
Valid values are top
or bottom
.
The default value is bottom
.
const Debug = new UduJS({
verticalPosition: 'top',
});
The maximum width of the pop-up message.
Valid values are number
or auto
.
The default value is 500
.
const Debug = new UduJS({
maxWidth: 'auto',
});
The maximum height of the pop-up message.
Valid value are number
.
The default value is 600
.
const Debug = new UduJS({
maxHeight: 400,
});
The font size in the pop-up message.
Valid value are string
.
The default value is 1em
.
const Debug = new UduJS({
fontSize: '2em',
});
The "Click to clear" tooltip on the pop-up message. If annoying, then you can turn it off.
Valid values are true
or false
.
The default value is true
.
const Debug = new UduJS({
showClearTitle: false,
});
Output direction for the show()
method.
Valid values are window
or console
.
The default value is window
.
const Debug = new UduJS({
showOutputDirection: 'console',
});
Allow coloring of the displayed information.
This parameter is applicable only to the console on the browser.
Turn it off if the browser does not correctly color the text in the console.
Valid values are true
or false
.
The default value is true
.
const Debug = new UduJS({
allowColorization: false,
});
The color scheme for the console in the browser.
Valid values are dark
, bright
or custom
.
The default value is dark
.
const Debug = new UduJS({
consoleColorScheme: 'bright',
});
The color scheme for a pop-up message in the browser.
Valid values are dark
, bright
or custom
.
The default value is bright
.
const Debug = new UduJS({
popupColorScheme: 'dark',
});
The color scheme for the console on the server.
Valid values are dark
, bright
or custom
.
The default value is dark
.
const Debug = new UduJS({
serverColorScheme: 'custom',
});
A newline character for messages in the console.
Recommended values: \r\n
- Windows-style, \n
- Linux-style.
Valid value are string
.
The default value is \n
.
const Debug = new UduJS({
consoleEOL: '\r\n',
});
The size of one tab character for formatting messages.
Step of indent for nested data structures.
Valid value are string
.
The default is two space characters.
const Debug = new UduJS({
tabChar: '..',
});
The number of decimal places for displaying the execution time in RTT-methods (accuracy of measurement).
Specify 0 to disable the decimal part.
Valid value are number
.
The default value is 2
.
const Debug = new UduJS({
decimalPlaces: 4,
});
This parameter allows you to quickly disable all components of the utility.
Valid values are true
or false
.
The default value is true
.
const Debug = new UduJS({
run: false,
});