@swapkit/helpers
Advanced tools
Comparing version 1.0.0-rc.12 to 1.0.0-rc.13
@@ -105,3 +105,3 @@ import { Chain } from '@swapkit/types'; | ||
toFixed(fixedDigits?: number): string; | ||
toAbbreviation(digits?: number): string | number; | ||
toAbbreviation(digits?: number): string; | ||
} | ||
@@ -108,0 +108,0 @@ |
@@ -791,3 +791,3 @@ var bt = Object.defineProperty; | ||
if (!i) | ||
return e; | ||
return this.getValue("string"); | ||
const a = 10 ** (n * 3); | ||
@@ -794,0 +794,0 @@ return `${(e / a).toFixed(t)}${i}`; |
@@ -45,3 +45,3 @@ { | ||
"types": "./dist/index.d.ts", | ||
"version": "1.0.0-rc.12", | ||
"version": "1.0.0-rc.13", | ||
"scripts": { | ||
@@ -48,0 +48,0 @@ "build": "vite build", |
@@ -184,2 +184,5 @@ import { describe, expect, test } from 'vitest'; | ||
expect(skNumber9.toAbbreviation(1)).toBe('1.2K'); | ||
const skNumber10 = new SwapKitNumber(123456.78); | ||
expect(skNumber10.toAbbreviation()).toBe('123.46K'); | ||
}); | ||
@@ -186,0 +189,0 @@ }); |
@@ -279,3 +279,3 @@ import { BaseDecimal } from '@swapkit/types'; | ||
if (!suffix) return value; | ||
if (!suffix) return this.getValue('string'); | ||
@@ -282,0 +282,0 @@ const scale = 10 ** (tier * 3); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
192489
3551