Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@swapkit/helpers

Package Overview
Dependencies
Maintainers
1
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swapkit/helpers - npm Package Compare versions

Comparing version 1.0.0-rc.28 to 1.0.0-rc.29

2

dist/index.es.js

@@ -788,3 +788,3 @@ var _t = Object.defineProperty;

} = {}) {
const c = this.getValue("number"), [a, u = ""] = c.toFixed(6).split("."), l = a.replace(/\B(?=(\d{3})+(?!\d))/g, i), h = !a && !u ? "0.00" : a === "0" ? `${parseFloat(`0.${u}`)}`.replace(".", n) : `${l}${u ? `${n}${u.slice(0, r)}` : ""}`;
const c = this.getValue("number"), [a, u = ""] = c.toFixed(6).split("."), l = a.replace(/\B(?=(\d{3})+(?!\d))/g, i), h = !a && !u ? "0.00" : a === "0" ? `${parseFloat(`0.${u}`)}`.replace(".", n) : `${l}${parseInt(u) ? `${n}${u.slice(0, r)}` : ""}`;
return `${e === "start" ? t : ""}${h}${e === "end" ? t : ""}`;

@@ -791,0 +791,0 @@ }

@@ -12,4 +12,4 @@ {

"@internal/config": "0.0.0-rc.1",
"@swapkit/tokens": "1.0.0-rc.10",
"@swapkit/types": "1.0.0-rc.10"
"@swapkit/tokens": "1.0.0-rc.11",
"@swapkit/types": "1.0.0-rc.11"
},

@@ -20,4 +20,4 @@ "eslintConfig": {

"peerDependencies": {
"@swapkit/tokens": "1.0.0-rc.10",
"@swapkit/types": "1.0.0-rc.10"
"@swapkit/tokens": "1.0.0-rc.11",
"@swapkit/types": "1.0.0-rc.11"
},

@@ -47,3 +47,3 @@ "exports": {

"types": "./dist/index.d.ts",
"version": "1.0.0-rc.28",
"version": "1.0.0-rc.29",
"scripts": {

@@ -50,0 +50,0 @@ "build": "vite build",

@@ -233,2 +233,5 @@ import { describe, expect, test } from 'vitest';

).toBe('0,000057€');
const skNumber4 = new SwapKitNumber(12345);
expect(skNumber4.toCurrency()).toBe('$12,345');
});

@@ -235,0 +238,0 @@ });

@@ -286,3 +286,3 @@ import { BaseDecimal } from '@swapkit/types';

? `${parseFloat(`0.${dec}`)}`.replace('.', decimalSeparator)
: `${integer}${dec ? `${decimalSeparator}${dec.slice(0, decimal)}` : ''}`;
: `${integer}${parseInt(dec) ? `${decimalSeparator}${dec.slice(0, decimal)}` : ''}`;

@@ -289,0 +289,0 @@ return `${currencyPosition === 'start' ? currency : ''}${parsedValue}${

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc