🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

ysk-utils

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ysk-utils - npm Package Compare versions

Comparing version
1.0.88
to
1.0.89
+2
-3
dist/goods.js

@@ -530,3 +530,2 @@ "use strict";

for (const goods of goodsList) {
// ✅ 强制转数字,彻底解决 NaN
const availableNum = Number(goods.number || 0) - Number(goods.returnNum || 0);

@@ -536,4 +535,4 @@ const safeNum = Math.max(0, availableNum);

if (goods.is_temporary || goods.isTemporary) {
// ✅ 也强制转数字
basePrice = new bignumber_js_1.BigNumber(Number(goods.discountSaleAmount) || 0);
// ✅ 修复这里:用 ?? 0,永远不会把 0 变成 NaN
basePrice = new bignumber_js_1.BigNumber(Number(goods.discountSaleAmount) ?? 0);
}

@@ -540,0 +539,0 @@ else if (goods.is_gift || goods.isGift) {

+1
-1
{
"name": "ysk-utils",
"version": "1.0.88",
"version": "1.0.89",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -14,5 +14,5 @@ ### 银收客价格计算工具

发布
npm publish
npm publish --//registry.npmjs.org/:_authToken=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
## 小版本升级
npm version patch