ether-unit-converter
Version:
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.
33 lines (26 loc) • 838 B
Markdown
<div align="center">
<img src="/seeds/assets/images/nft%20souq%20marhaba.svg" width="500" style="padding:30px;">
<br />
<h1>
The utility functions provide a conversation which can easily convert Wei to value and value to Wei without to round value.(precision)
</h1>
</div>
```
npm install ether-unit-convertor
```
```
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
```