1.0.0-alpha.7 • Published 5 years ago

@helixnetwork/unit-converter v1.0.0-alpha.7

Weekly downloads
8
License
MIT
Repository
github
Last release
5 years ago

@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)

ParamTypeDescription
valuestring | int | float
fromUnitstringName of original value unit
toUnitstringName of unit wich we convert to

Converts accross Helix units. Valid unit names are: h, Kh, Mh, Gh, Th, Ph