Module: webgis4u/util/string/formatUnitValue

Methods

(static) formatUnitValue(options)

Formats a value according to the passed options
Parameters:
Name Type Description
options FormatUnitValueOptions The options
Source:

Type Definitions

FormatUnitValueOptions

Type:
  • object
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:
  • object
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: