Unit conversion library
import * as units from '@browseth/units';
You can also import specific functions
import {etherToWei, conversion} from '@browseth/units';
- units . convert ( fromUnit, value, toUnit )
convert unit of value to unit
- units . etherToWei ( value )
convert value in ether to wei
- units . gweiToWei ( value )
convert value in gwei to wei
- units . weiToEther ( value )
convert value in wei to ether
- units . toWei ( fromUnit, value )
convert unit of value to wei
- units . toEther ( fromUnit, value )
convert unit of value to ether
- units . unitToPow ( unit )
returns the power of the unit relative to wei
- Supported Units:
wei, kwei, ada, femtoether, mwei, babbage, picoether, gwei, shannon, nanoether, nano, szabo, microether, micro, finney, milliether, milli, ether, kether, grand, einstein, mether, gether, tether