@abckey/unit-helper
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

unit-helper

NPM version

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

License

FOSSA Status

Readme

Keywords

none

Package Sidebar

Install

npm i @abckey/unit-helper

Weekly Downloads

0

Version

0.6.0

License

MIT

Unpacked Size

6.11 kB

Total Files

5

Last publish

Collaborators

  • webees