mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-07-19 22:45:41 +00:00
balanceFormat.calcSi with optional decimals (#81)
* balanceFormat.calcSi with optional decimals * Example for calcSi
This commit is contained in:
@@ -14,3 +14,10 @@ formatBalance.setDefaults({
|
||||
|
||||
formatBalance('12345'); // 12.345z DOT
|
||||
```
|
||||
|
||||
## calcSi
|
||||
|
||||
```js
|
||||
// calculates the SI unit applucable
|
||||
formatBalance.calcSi('12345'); // { power: 3, value: 'k', text: 'Kilo' }
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user