bigval
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -0,1 +1,3 @@ | ||
# [1.7.0](https://github.com/hiddentao/bigval/compare/v1.6.0...v1.7.0) (2023-11-06) | ||
# [1.6.0](https://github.com/hiddentao/bigval/compare/v1.5.0...v1.6.0) (2023-11-06) | ||
@@ -2,0 +4,0 @@ |
@@ -123,5 +123,5 @@ import { Decimal } from 'decimal.js'; | ||
/** | ||
* Get no. of decimal places. | ||
* Get no. of decimal places in the curent value. | ||
*/ | ||
get decimals(): number; | ||
get decimalCount(): number; | ||
/** | ||
@@ -128,0 +128,0 @@ * Round to the nearest whole number. |
@@ -137,5 +137,5 @@ "use strict"; | ||
/** | ||
* Get no. of decimal places. | ||
* Get no. of decimal places in the curent value. | ||
*/ | ||
get decimals() { | ||
get decimalCount() { | ||
return this._n.decimalPlaces(); | ||
@@ -142,0 +142,0 @@ } |
@@ -123,5 +123,5 @@ import { Decimal } from 'decimal.js'; | ||
/** | ||
* Get no. of decimal places. | ||
* Get no. of decimal places in the curent value. | ||
*/ | ||
get decimals(): number; | ||
get decimalCount(): number; | ||
/** | ||
@@ -128,0 +128,0 @@ * Round to the nearest whole number. |
@@ -133,5 +133,5 @@ import { Decimal } from 'decimal.js'; | ||
/** | ||
* Get no. of decimal places. | ||
* Get no. of decimal places in the curent value. | ||
*/ | ||
get decimals() { | ||
get decimalCount() { | ||
return this._n.decimalPlaces(); | ||
@@ -138,0 +138,0 @@ } |
{ | ||
"name": "bigval", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Easier calculation and formatting of crypto values with decimals. Useful for smart contract interaction.", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -35,5 +35,6 @@ [![NPM module](https://badge.fury.io/js/bigval.svg)](https://badge.fury.io/js/bigval) | ||
const v2 = new BigVal('1000000000000000000') | ||
const v3 = new BigVal('0xde0b6b3a7640000') | ||
const v4 = new BigVal('b1000000000000000000') | ||
const v5 = new BigVal(new BigVal(1000000000000000000)) | ||
const v3 = new BigVal('0.00000001') | ||
const v4 = new BigVal('0xde0b6b3a7640000') | ||
const v5 = new BigVal('b1000000000000000000') | ||
const v6 = new BigVal(new BigVal(1000000000000000000)) | ||
``` | ||
@@ -125,2 +126,5 @@ | ||
console.log( v3.toString() ) // "33" | ||
const v4 = new BigVal(0.00000001) | ||
console.log(v4.decimalCount) // 8 | ||
``` | ||
@@ -127,0 +131,0 @@ |
Sorry, the diff of this file is too big to display
412311
205