unit-helper
A Blockchain Encrypted Digital Currency Unit Converter.
Install
npm i @abckey/unit-helper
Usage
import UnitHelper from '@abckey/unit-helper'
UnitHelper('9876543210.9876543210').format() // '9,876,543,210.987654321'
UnitHelper('9876543210.9876543210').format(2) // '9,876,543,210.98'
UnitHelper('9876543210.9876543210').format(0) // '9,876,543,210'
UnitHelper('9876543210123456789', 'wei_gwei').format(7) // '9,876,543,210.1234567'
UnitHelper('9876543210123000000', 'wei_gwei').format(7) // '9,876,543,210.123'
UnitHelper('9876543210123000000', 'wei_gwei').toFormat(7) // '9,876,543,210.1230000'
UnitHelper(1, 'btc_sat').toString() // '100000000'
UnitHelper(1, 'btc_sat').toString(16) // '5f5e100'
UnitHelper('100000000', 'sat_doge').toNumber() // 1