util-helpers 4.19.3 → 4.19.4

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/esm/VERSION.js CHANGED
@@ -1,4 +1,4 @@
1
- var VERSION = "4.19.3";
1
+ var VERSION = "4.19.4";
2
2
  var VERSION$1 = VERSION;
3
3
 
4
4
  export { VERSION$1 as default };
@@ -41,6 +41,7 @@ function formatDec(decStr, precision, decimal) {
41
41
  return decimal + ret;
42
42
  }
43
43
  var formatMoney = function (num, options) {
44
+ if (num === void 0) { num = ''; }
44
45
  if (options === void 0) { options = {}; }
45
46
  var _a = options.precision, precision = _a === void 0 ? 2 : _a, symbol = options.symbol, _b = options.thousand, thousand = _b === void 0 ? ',' : _b, _c = options.decimal, decimal = _c === void 0 ? '.' : _c;
46
47
  if (!checkNumber(num)) {
package/esm/index.js CHANGED
@@ -57,6 +57,6 @@ export { default as findTreeSelect } from './findTreeSelect.js';
57
57
  export { setDisableWarning } from './utils/config.js';
58
58
  export { default as VERSION } from './VERSION.js';
59
59
 
60
- var version = "4.19.3";
60
+ var version = "4.19.4";
61
61
 
62
62
  export { version };
@@ -1,6 +1,7 @@
1
1
  import { toString } from 'ut2';
2
2
 
3
3
  function replaceChar(str, options) {
4
+ if (str === void 0) { str = ''; }
4
5
  if (options === void 0) { options = {}; }
5
6
  var _a = options.char, char = _a === void 0 ? '*' : _a, exclude = options.exclude;
6
7
  var _b = options.start, start = _b === void 0 ? 3 : _b, _c = options.end, end = _c === void 0 ? -4 : _c, repeat = options.repeat;
package/lib/VERSION.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var VERSION = "4.19.3";
3
+ var VERSION = "4.19.4";
4
4
  var VERSION$1 = VERSION;
5
5
 
6
6
  module.exports = VERSION$1;
@@ -43,6 +43,7 @@ function formatDec(decStr, precision, decimal) {
43
43
  return decimal + ret;
44
44
  }
45
45
  var formatMoney = function (num, options) {
46
+ if (num === void 0) { num = ''; }
46
47
  if (options === void 0) { options = {}; }
47
48
  var _a = options.precision, precision = _a === void 0 ? 2 : _a, symbol = options.symbol, _b = options.thousand, thousand = _b === void 0 ? ',' : _b, _c = options.decimal, decimal = _c === void 0 ? '.' : _c;
48
49
  if (!checkNumber(num)) {
package/lib/index.js CHANGED
@@ -59,7 +59,7 @@ var findTreeSelect = require('./findTreeSelect.js');
59
59
  var config = require('./utils/config.js');
60
60
  var VERSION = require('./VERSION.js');
61
61
 
62
- exports.version = "4.19.3";
62
+ exports.version = "4.19.4";
63
63
 
64
64
  exports.isMobile = isMobile;
65
65
  exports.isTelephone = isTelephone;
@@ -3,6 +3,7 @@
3
3
  var ut2 = require('ut2');
4
4
 
5
5
  function replaceChar(str, options) {
6
+ if (str === void 0) { str = ''; }
6
7
  if (options === void 0) { options = {}; }
7
8
  var _a = options.char, char = _a === void 0 ? '*' : _a, exclude = options.exclude;
8
9
  var _b = options.start, start = _b === void 0 ? 3 : _b, _c = options.end, end = _c === void 0 ? -4 : _c, repeat = options.repeat;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "util-helpers",
3
- "version": "4.19.3",
3
+ "version": "4.19.4",
4
4
  "description": "一个基于业务场景的工具方法库",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
@@ -55,7 +55,7 @@
55
55
  "@babel/preset-typescript": "^7.22.5",
56
56
  "@commitlint/cli": "^17.6.6",
57
57
  "@commitlint/config-conventional": "^17.6.6",
58
- "@rollup/plugin-commonjs": "^25.0.2",
58
+ "@rollup/plugin-commonjs": "^25.0.3",
59
59
  "@rollup/plugin-node-resolve": "^15.1.0",
60
60
  "@rollup/plugin-replace": "^5.0.2",
61
61
  "@rollup/plugin-terser": "^0.4.3",
@@ -74,7 +74,7 @@
74
74
  "jsdoc": "^4.0.2",
75
75
  "lint-staged": "^13.2.3",
76
76
  "prettier": "^2.8.8",
77
- "rollup": "^3.26.0",
77
+ "rollup": "^3.26.3",
78
78
  "typescript": "^5.1.6",
79
79
  "yorkie": "^2.0.0"
80
80
  },
@@ -93,6 +93,6 @@
93
93
  },
94
94
  "dependencies": {
95
95
  "tslib": "^2.6.0",
96
- "ut2": "^1.1.3"
96
+ "ut2": "^1.3.2"
97
97
  }
98
98
  }
@@ -36,6 +36,7 @@ type DownloadOptions = {
36
36
  * @static
37
37
  * @alias module:Other.download
38
38
  * @since 4.16.0
39
+ * @see {@link https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Access-Control-Expose-Headers | Access-Control-Expose-Headers}
39
40
  * @see {@link https://zh.wikipedia.org/wiki/多用途互聯網郵件擴展 | MIME}
40
41
  * @see {@link https://9ykc9s.csb.app/ | 在线示例}
41
42
  * @param {string|Blob|ArrayBuffer|TypedArray} data 字符串、blob数据或url地址
@@ -43,5 +43,5 @@ type Options = {
43
43
  * // 字符串数字
44
44
  * formatMoney('3000.03', { precision: 4 }); // 3,000.0300
45
45
  */
46
- declare const formatMoney: (num: string | number, options?: Options) => string;
46
+ declare const formatMoney: (num?: string | number, options?: Options) => string;
47
47
  export default formatMoney;
@@ -50,8 +50,8 @@ type Options = {
50
50
  * // 用户名
51
51
  * replaceChar('林某某', {start: 1, end: Infinity, repeat: 2}); // 林**
52
52
  * replaceChar('林某', {start: 1, end: Infinity, repeat: 2}); // 林**
53
- * replaceChar('林某某某', {start: 1, end: Infinity, repeat: 2}); // 林**
53
+ * replaceChar('林某某某', { start: 1, end: -1, repeat: 1 }); // 林*某
54
54
  *
55
55
  */
56
- declare function replaceChar(str: string, options?: Options): string;
56
+ declare function replaceChar(str?: string, options?: Options): string;
57
57
  export default replaceChar;