Skip to content

A Blockchain Encrypted Digital Currency Unit Converter.

License

Notifications You must be signed in to change notification settings

abclib/unit-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Blockchain Encrypted Digital Currency Unit Converter.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published