Methods
Formats a value according to the passed options
Parameters:
Name |
Type |
Description |
options |
FormatUnitValueOptions
|
The options |
- Source:
Type Definitions
Type:
Properties:
Name |
Type |
Description |
value |
number
|
The value that should be formatted |
decimals |
number
|
The number of decimals |
units |
Array.<Unit>
|
The units that should be considered by this function |
- Source:
Unit
Type:
Properties:
Name |
Type |
Attributes |
Default |
Description |
factor |
number
|
<optional>
|
1
|
The factor used to convert a number |
abbreviation |
string
|
|
|
The abbreviation used for this unit |
limit |
number
|
<optional>
|
factor
|
The limit at which it shall be converted to this unit |
fallback |
boolean
|
<optional>
|
false
|
If true, this unit will be used as a fallback |
- Source: