ether-unit-converter
v0.0.1
Published
The utility functions provide a conversation assortment of common utility functions, and can easily convert Wei to value and value to Wei without a round number.
Downloads
25
Maintainers
Readme
Installation
npm install ether-unit-convertor
Basic Usage
From wei to value converstion using how much decimal convertion needed
Example:
WebUtils.fromWei(valueInWei,numberDecimal)
WebUtils.fromWei("100000", 6); //: 0.1
WebUtils.fromWei("1000000000", 10); //: 0.1
numberDecimal: 1-18
From value to wei converstion using how much decimal convertion needed
Example
WebUtils.toWei(value,numberDecimal)
WebUtils.toWei("0.1", 6); //: 100000
WebUtils.toWei(amount, 10); //:1000000000
numberDecimal: 1-18