@helixnetwork/unit-converter
Converts value across different Helix units.
Installation
Install using npm:
npm install @helixnetwork/unit-converter
or using yarn:
yarn add @helixnetwork/unit-converter
API Reference
<a name="module_unit-converter..convertUnits"></a>
unit-converter~convertUnits(value, fromUnit, toUnit)
Param | Type | Description |
---|---|---|
value |
string | int | float
|
|
fromUnit | string |
Name of original value unit |
toUnit | string |
Name of unit wich we convert to |
Converts accross Helix units. Valid unit names are:
h
, Kh
, Mh
, Gh
, Th
, Ph