@wibetter/json-utils 5.0.3 → 5.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -6965,7 +6965,7 @@ function baseSchema2JsonData(jsonSchema, jsonData) {
6965
6965
  curJsonData = hasProperties(curValue) ? curValue : false;
6966
6966
  break;
6967
6967
  case 'number':
6968
- curJsonData = hasProperties(curValue) ? curValue : 1;
6968
+ curJsonData = hasProperties(curValue) ? curValue : undefined;
6969
6969
  break;
6970
6970
  case 'json':
6971
6971
  /* 转成json类型进行特殊处理,需要保证json类型的数值是json对象 */
@@ -6995,7 +6995,7 @@ function baseSchema2JsonData(jsonSchema, jsonData) {
6995
6995
  // 兼容处理:解决box-style默认值丢失问题
6996
6996
  curJsonData = curValue ? curValue : jsonSchema.default;
6997
6997
  } else {
6998
- curJsonData = hasProperties(curValue) ? curValue : '';
6998
+ curJsonData = hasProperties(curValue) ? curValue : undefined;
6999
6999
  }
7000
7000
  }
7001
7001
  return curJsonData;
@@ -4441,7 +4441,7 @@ function Ur(e, t) {
4441
4441
  r = !!i(o) && o;
4442
4442
  break;
4443
4443
  case 'number':
4444
- r = i(o) ? o : 1;
4444
+ r = i(o) ? o : void 0;
4445
4445
  break;
4446
4446
  case 'json':
4447
4447
  var a = '';
@@ -4461,7 +4461,7 @@ function Ur(e, t) {
4461
4461
  ? o || e.default
4462
4462
  : i(o)
4463
4463
  ? o
4464
- : '';
4464
+ : void 0;
4465
4465
  }
4466
4466
  return r;
4467
4467
  }
package/dist/index.js CHANGED
@@ -1535,7 +1535,7 @@
1535
1535
  r = !!n(a) && a;
1536
1536
  break;
1537
1537
  case 'number':
1538
- r = n(a) ? a : 1;
1538
+ r = n(a) ? a : void 0;
1539
1539
  break;
1540
1540
  case 'json':
1541
1541
  var o = '';
@@ -1555,7 +1555,7 @@
1555
1555
  ? a || e.default
1556
1556
  : n(a)
1557
1557
  ? a
1558
- : '';
1558
+ : void 0;
1559
1559
  }
1560
1560
  return r;
1561
1561
  }
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * @wibetter/json-utils v5.0.3
2
+ * @wibetter/json-utils v5.0.7
3
3
  * author: wibetter
4
4
  * build tool: AKFun
5
- * build time: Tue Dec 17 2024 16:03:53 GMT+0800 (中国标准时间)
5
+ * build time: Mon Dec 23 2024 18:08:12 GMT+0800 (中国标准时间)
6
6
  * build tool info: https://github.com/wibetter/akfun
7
7
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wibetter/json-utils",
3
- "version": "5.0.3",
3
+ "version": "5.0.7",
4
4
  "description": "提供JSON相关的各类工具方法,比如schema转json、json转schema、json元数据分析等",
5
5
  "keywords": [
6
6
  "json工具包",