balanceFormat.calcSi with optional decimals (#81)

* balanceFormat.calcSi with optional decimals

* Example for calcSi
This commit is contained in:
Jaco Greeff
2019-02-19 09:26:08 +01:00
committed by GitHub
parent 3a1338bef6
commit 671006ef9a
2 changed files with 10 additions and 2 deletions
+7
View File
@@ -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' }
```