sculp-js 1.18.2 → 1.19.0

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.
Files changed (91) hide show
  1. package/README.md +83 -6
  2. package/dist/cjs/{array.js → array.cjs} +10 -2
  3. package/dist/cjs/{async.js → async.cjs} +8 -2
  4. package/dist/cjs/{base64.js → base64.cjs} +11 -4
  5. package/dist/cjs/{clipboard.js → clipboard.cjs} +9 -4
  6. package/dist/cjs/{cloneDeep.js → cloneDeep.cjs} +6 -2
  7. package/dist/cjs/{cookie.js → cookie.cjs} +9 -3
  8. package/dist/cjs/{date.js → date.cjs} +13 -3
  9. package/dist/cjs/{dom.js → dom.cjs} +16 -5
  10. package/dist/cjs/{download.js → download.cjs} +12 -4
  11. package/dist/cjs/{file.js → file.cjs} +9 -3
  12. package/dist/cjs/{func.js → func.cjs} +10 -2
  13. package/dist/cjs/{index.js → index.cjs} +63 -31
  14. package/dist/cjs/{isEqual.js → isEqual.cjs} +6 -2
  15. package/dist/cjs/{math.js → math.cjs} +10 -2
  16. package/dist/cjs/{number.js → number.cjs} +16 -7
  17. package/dist/cjs/{object.js → object.cjs} +19 -5
  18. package/dist/cjs/{path.js → path.cjs} +7 -2
  19. package/dist/cjs/{qs.js → qs.cjs} +9 -4
  20. package/dist/cjs/{random.js → random.cjs} +11 -4
  21. package/dist/cjs/{string.js → string.cjs} +15 -2
  22. package/dist/cjs/{tooltip.js → tooltip.cjs} +8 -4
  23. package/dist/cjs/{tree.js → tree.cjs} +15 -4
  24. package/dist/cjs/{type.js → type.cjs} +27 -2
  25. package/dist/cjs/{unicodeToolkit.js → unicodeToolkit.cjs} +6 -2
  26. package/dist/cjs/{unique.js → unique.cjs} +11 -5
  27. package/dist/cjs/{url.js → url.cjs} +12 -5
  28. package/dist/cjs/{validator.js → validator.cjs} +21 -2
  29. package/dist/cjs/{variable.js → variable.cjs} +11 -3
  30. package/dist/cjs/{watermark.js → watermark.cjs} +7 -3
  31. package/dist/esm/{array.js → array.mjs} +9 -2
  32. package/dist/esm/{async.js → async.mjs} +7 -2
  33. package/dist/esm/{base64.js → base64.mjs} +10 -4
  34. package/dist/esm/{clipboard.js → clipboard.mjs} +8 -4
  35. package/dist/esm/{cloneDeep.js → cloneDeep.mjs} +5 -2
  36. package/dist/esm/{cookie.js → cookie.mjs} +8 -3
  37. package/dist/esm/{date.js → date.mjs} +21 -3
  38. package/dist/esm/{dom.js → dom.mjs} +25 -5
  39. package/dist/esm/{download.js → download.mjs} +11 -4
  40. package/dist/esm/{file.js → file.mjs} +8 -3
  41. package/dist/esm/{func.js → func.mjs} +9 -2
  42. package/dist/esm/index.mjs +191 -0
  43. package/dist/esm/{isEqual.js → isEqual.mjs} +5 -2
  44. package/dist/esm/{math.js → math.mjs} +9 -2
  45. package/dist/esm/{number.js → number.mjs} +23 -7
  46. package/dist/esm/{object.js → object.mjs} +16 -2
  47. package/dist/esm/{path.js → path.mjs} +6 -2
  48. package/dist/esm/{qs.js → qs.mjs} +8 -4
  49. package/dist/esm/{random.js → random.mjs} +10 -4
  50. package/dist/esm/{string.js → string.mjs} +14 -1
  51. package/dist/esm/{tooltip.js → tooltip.mjs} +7 -4
  52. package/dist/esm/{tree.js → tree.mjs} +24 -4
  53. package/dist/esm/{type.js → type.mjs} +27 -2
  54. package/dist/esm/{unicodeToolkit.js → unicodeToolkit.mjs} +5 -2
  55. package/dist/esm/{unique.js → unique.mjs} +10 -5
  56. package/dist/esm/{url.js → url.mjs} +11 -5
  57. package/dist/esm/{validator.js → validator.mjs} +20 -1
  58. package/dist/esm/{variable.js → variable.mjs} +10 -3
  59. package/dist/esm/{watermark.js → watermark.mjs} +6 -3
  60. package/dist/types/array.d.ts +8 -0
  61. package/dist/types/async.d.ts +6 -0
  62. package/dist/types/base64.d.ts +7 -0
  63. package/dist/types/clipboard.d.ts +5 -1
  64. package/dist/types/cloneDeep.d.ts +4 -0
  65. package/dist/types/cookie.d.ts +6 -0
  66. package/dist/types/date.d.ts +10 -0
  67. package/dist/types/dom.d.ts +11 -0
  68. package/dist/types/download.d.ts +8 -1
  69. package/dist/types/file.d.ts +6 -1
  70. package/dist/types/func.d.ts +8 -0
  71. package/dist/types/isEqual.d.ts +4 -0
  72. package/dist/types/math.d.ts +8 -1
  73. package/dist/types/number.d.ts +11 -2
  74. package/dist/types/object.d.ts +13 -0
  75. package/dist/types/path.d.ts +5 -0
  76. package/dist/types/qs.d.ts +5 -0
  77. package/dist/types/random.d.ts +7 -0
  78. package/dist/types/string.d.ts +13 -0
  79. package/dist/types/tooltip.d.ts +7 -0
  80. package/dist/types/tree.d.ts +11 -0
  81. package/dist/types/type.d.ts +29 -4
  82. package/dist/types/unicodeToolkit.d.ts +4 -0
  83. package/dist/types/unique.d.ts +6 -0
  84. package/dist/types/url.d.ts +7 -0
  85. package/dist/types/validator.d.ts +19 -0
  86. package/dist/types/variable.d.ts +8 -0
  87. package/dist/types/watermark.d.ts +4 -0
  88. package/dist/umd/index.min.js +2 -2
  89. package/package.json +92 -120
  90. package/dist/esm/index.js +0 -130
  91. package/dist/types/index.d.ts +0 -28
package/README.md CHANGED
@@ -120,17 +120,94 @@ const cloned = cloneDeep(original);
120
120
 
121
121
  ## 📦 Module Formats
122
122
 
123
+ ### Named Imports (Recommended)
124
+
123
125
  ```js
124
- // ES Modules (recommended)
125
- import { cloneDeep } from 'sculp-js';
126
+ // ES Modules - Named imports (tree-shaking friendly)
127
+ import { cloneDeep, forEachDeep } from 'sculp-js';
128
+
129
+ // CommonJS - Named imports
130
+ const { cloneDeep, forEachDeep } = require('sculp-js');
131
+ ```
126
132
 
127
- // Individual module imports
128
- import cloneDeep from 'sculp-js/cloneDeep';
133
+ ### Default Import (Full Library)
129
134
 
130
- // CommonJS
131
- const { cloneDeep } = require('sculp-js');
135
+ ```js
136
+ // ES Modules - Default import
137
+ import sculp from 'sculp-js';
138
+ const { cloneDeep, forEachDeep } = sculp;
139
+
140
+ // CommonJS - Default import
141
+ const sculp = require('sculp-js');
142
+ const { cloneDeep, forEachDeep } = sculp;
132
143
  ```
133
144
 
145
+ ### Module-Specific Imports
146
+
147
+ Import specific modules for better tree-shaking and smaller bundle sizes:
148
+
149
+ ```js
150
+ // ES Modules - Import specific modules
151
+ import array from 'sculp-js/array';
152
+ import string from 'sculp-js/string';
153
+ import type from 'sculp-js/type';
154
+ import date from 'sculp-js/date';
155
+ import object from 'sculp-js/object';
156
+ import math from 'sculp-js/math';
157
+ import validator from 'sculp-js/validator';
158
+ // ... and more
159
+
160
+ // CommonJS - Import specific modules
161
+ const array = require('sculp-js/array');
162
+ const string = require('sculp-js/string');
163
+ const type = require('sculp-js/type');
164
+
165
+ // Usage examples
166
+ import array from 'sculp-js/array';
167
+ array.arrayEach([1, 2, 3], val => console.log(val));
168
+
169
+ import string from 'sculp-js/string';
170
+ const camelCase = string.stringCamelCase('hello-world'); // 'helloWorld'
171
+
172
+ import validator from 'sculp-js/validator';
173
+ if (validator.isEmail('test@example.com')) {
174
+ console.log('Valid email');
175
+ }
176
+ ```
177
+
178
+ ### Available Modules
179
+
180
+ All modules support both named and default exports:
181
+
182
+ - `sculp-js/array` - Array utilities
183
+ - `sculp-js/string` - String manipulation
184
+ - `sculp-js/type` - Type checking
185
+ - `sculp-js/date` - Date formatting
186
+ - `sculp-js/object` - Object utilities
187
+ - `sculp-js/math` - Math operations
188
+ - `sculp-js/number` - Number formatting
189
+ - `sculp-js/url` - URL parsing
190
+ - `sculp-js/qs` - Query string parsing
191
+ - `sculp-js/path` - Path utilities
192
+ - `sculp-js/async` - Async utilities
193
+ - `sculp-js/func` - Function utilities
194
+ - `sculp-js/random` - Random generators
195
+ - `sculp-js/validator` - Validation functions
196
+ - `sculp-js/tree` - Tree operations
197
+ - `sculp-js/base64` - Base64 encoding
198
+ - `sculp-js/unique` - Unique ID generators
199
+ - `sculp-js/variable` - Variable utilities
200
+ - `sculp-js/clipboard` - Clipboard operations
201
+ - `sculp-js/cookie` - Cookie management
202
+ - `sculp-js/dom` - DOM utilities
203
+ - `sculp-js/download` - Download helpers
204
+ - `sculp-js/file` - File utilities
205
+ - `sculp-js/watermark` - Watermark generation
206
+ - `sculp-js/tooltip` - Tooltip utilities
207
+ - `sculp-js/cloneDeep` - Deep cloning
208
+ - `sculp-js/isEqual` - Deep equality
209
+ - `sculp-js/unicodeToolkit` - Unicode utilities
210
+
134
211
  ## 📄 License
135
212
 
136
213
  MIT License © 2023-present, [chandq](https://github.com/chandq)
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 遍历数组,返回 false 中断遍历(支持continue和break操作)
@@ -166,9 +166,17 @@ function diffArray(source, target, getKey) {
166
166
  }
167
167
  return { added, removed: del };
168
168
  }
169
+ var array = {
170
+ arrayEach,
171
+ arrayEachAsync,
172
+ arrayInsertBefore,
173
+ arrayRemove,
174
+ diffArray
175
+ };
169
176
 
170
177
  exports.arrayEach = arrayEach;
171
178
  exports.arrayEachAsync = arrayEachAsync;
172
179
  exports.arrayInsertBefore = arrayInsertBefore;
173
180
  exports.arrayRemove = arrayRemove;
181
+ exports.default = array;
174
182
  exports.diffArray = diffArray;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 等待一段时间
@@ -88,7 +88,13 @@ function safeAwait(promise, errorExt) {
88
88
  return [err, undefined];
89
89
  });
90
90
  }
91
+ var async = {
92
+ wait,
93
+ asyncMap,
94
+ safeAwait
95
+ };
91
96
 
92
97
  exports.asyncMap = asyncMap;
98
+ exports.default = async;
93
99
  exports.safeAwait = safeAwait;
94
100
  exports.wait = wait;
@@ -1,15 +1,15 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var func = require('./func.js');
12
- var type = require('./type.js');
11
+ var func = require('./func.cjs');
12
+ var type = require('./type.cjs');
13
13
 
14
14
  const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
15
15
  // eslint-disable-next-line
@@ -122,8 +122,15 @@ function b64encode(rawStr) {
122
122
  // 将二进制字符串转换为base64编码的字符串
123
123
  return !type.isNullOrUnDef(func.getGlobal('btoa')) ? func.getGlobal('btoa')(binaryString) : weBtoa(binaryString);
124
124
  }
125
+ var base64 = {
126
+ weBtoa,
127
+ weAtob,
128
+ b64decode,
129
+ b64encode
130
+ };
125
131
 
126
132
  exports.b64decode = b64decode;
127
133
  exports.b64encode = b64encode;
134
+ exports.default = base64;
128
135
  exports.weAtob = weAtob;
129
136
  exports.weBtoa = weBtoa;
@@ -1,15 +1,15 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var dom = require('./dom.js');
12
- var type = require('./type.js');
11
+ var dom = require('./dom.cjs');
12
+ var type = require('./type.cjs');
13
13
 
14
14
  /**
15
15
  * 复制文本,优先使用navigator.clipboard,仅在安全上下文(HTTPS/localhost)下生效,若不支持则回退使用execCommand方式
@@ -90,6 +90,11 @@ function createFakeElement(value) {
90
90
  fakeElement.value = value;
91
91
  return fakeElement;
92
92
  }
93
+ var clipboard = {
94
+ copyText,
95
+ fallbackCopyText
96
+ };
93
97
 
94
98
  exports.copyText = copyText;
99
+ exports.default = clipboard;
95
100
  exports.fallbackCopyText = fallbackCopyText;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 深拷贝堪称完全体 即:任何类型的数据都会被深拷贝
@@ -114,5 +114,9 @@ function cloneDeep(source, map = new WeakMap()) {
114
114
  }
115
115
  return copy;
116
116
  }
117
+ var cloneDeep_default = {
118
+ cloneDeep
119
+ };
117
120
 
118
121
  exports.cloneDeep = cloneDeep;
122
+ exports.default = cloneDeep_default;
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var type = require('./type.js');
11
+ var type = require('./type.cjs');
12
12
 
13
13
  /**
14
14
  * 获取cookie
@@ -56,7 +56,13 @@ function cookieSet(name, value, maxAge) {
56
56
  * @param name cookie 名称
57
57
  */
58
58
  const cookieDel = name => cookieSet(name, '', -1);
59
+ var cookie = {
60
+ cookieSet,
61
+ cookieGet,
62
+ cookieDel
63
+ };
59
64
 
60
65
  exports.cookieDel = cookieDel;
61
66
  exports.cookieGet = cookieGet;
62
67
  exports.cookieSet = cookieSet;
68
+ exports.default = cookie;
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var type = require('./type.js');
11
+ var type = require('./type.cjs');
12
12
 
13
13
  const isValidDate = any => type.isDate(any) && !type.isNaN(any.getTime());
14
14
  /* istanbul ignore next */
@@ -212,11 +212,21 @@ function calculateDateTime(originDateTime, n, dateSep = '-', timeSep = ':') {
212
212
  String(targetDateTime.getSeconds()).padStart(2, '0')
213
213
  );
214
214
  }
215
+ var date = {
216
+ isValidDate,
217
+ dateParse,
218
+ dateToStart,
219
+ dateToEnd,
220
+ formatDate,
221
+ calculateDate,
222
+ calculateDateTime
223
+ };
215
224
 
216
225
  exports.calculateDate = calculateDate;
217
226
  exports.calculateDateTime = calculateDateTime;
218
227
  exports.dateParse = dateParse;
219
228
  exports.dateToEnd = dateToEnd;
220
229
  exports.dateToStart = dateToStart;
230
+ exports.default = date;
221
231
  exports.formatDate = formatDate;
222
232
  exports.isValidDate = isValidDate;
@@ -1,16 +1,16 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var object = require('./object.js');
12
- var string = require('./string.js');
13
- var type = require('./type.js');
11
+ var object = require('./object.cjs');
12
+ var string = require('./string.cjs');
13
+ var type = require('./type.cjs');
14
14
 
15
15
  /**
16
16
  * 判断元素是否包含某个样式名
@@ -150,8 +150,19 @@ function select(element) {
150
150
  }
151
151
  return selectedText;
152
152
  }
153
+ var dom = {
154
+ hasClass,
155
+ addClass,
156
+ removeClass,
157
+ setStyle,
158
+ getStyle,
159
+ getComputedCssVal,
160
+ getStrWidthPx,
161
+ select
162
+ };
153
163
 
154
164
  exports.addClass = addClass;
165
+ exports.default = dom;
155
166
  exports.getComputedCssVal = getComputedCssVal;
156
167
  exports.getStrWidthPx = getStrWidthPx;
157
168
  exports.getStyle = getStyle;
@@ -1,15 +1,15 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var type = require('./type.js');
12
- var url = require('./url.js');
11
+ var type = require('./type.cjs');
12
+ var url = require('./url.cjs');
13
13
 
14
14
  /**
15
15
  * 通过打开新窗口的方式下载
@@ -131,8 +131,16 @@ function downloadData(data, fileType, filename, headers) {
131
131
  downloadHref(href, filename);
132
132
  }
133
133
  }
134
+ var download = {
135
+ downloadURL,
136
+ downloadHref,
137
+ downloadBlob,
138
+ crossOriginDownload,
139
+ downloadData
140
+ };
134
141
 
135
142
  exports.crossOriginDownload = crossOriginDownload;
143
+ exports.default = download;
136
144
  exports.downloadBlob = downloadBlob;
137
145
  exports.downloadData = downloadData;
138
146
  exports.downloadHref = downloadHref;
@@ -1,14 +1,14 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var type = require('./type.js');
11
+ var type = require('./type.cjs');
12
12
 
13
13
  /**
14
14
  * 判断是否支持canvas
@@ -208,7 +208,13 @@ function compressImg(file, options = { mime: 'image/jpeg', minFileSizeKB: 50 })
208
208
  }
209
209
  return Promise.resolve(null);
210
210
  }
211
+ var file = {
212
+ supportCanvas,
213
+ chooseLocalFile,
214
+ compressImg
215
+ };
211
216
 
212
217
  exports.chooseLocalFile = chooseLocalFile;
213
218
  exports.compressImg = compressImg;
219
+ exports.default = file;
214
220
  exports.supportCanvas = supportCanvas;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 防抖函数
@@ -113,8 +113,16 @@ function getGlobal(key) {
113
113
  else if (typeof global !== 'undefined') return global[key];
114
114
  else if (typeof self !== 'undefined') return self[key];
115
115
  }
116
+ var func = {
117
+ debounce,
118
+ throttle,
119
+ once,
120
+ getGlobal,
121
+ setGlobal
122
+ };
116
123
 
117
124
  exports.debounce = debounce;
125
+ exports.default = func;
118
126
  exports.getGlobal = getGlobal;
119
127
  exports.once = once;
120
128
  exports.setGlobal = setGlobal;
@@ -1,41 +1,72 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
- var array = require('./array.js');
12
- var clipboard = require('./clipboard.js');
13
- var cookie = require('./cookie.js');
14
- var date = require('./date.js');
15
- var dom = require('./dom.js');
16
- var download = require('./download.js');
17
- var object = require('./object.js');
18
- var path = require('./path.js');
19
- var qs = require('./qs.js');
20
- var string = require('./string.js');
21
- var type = require('./type.js');
22
- var url = require('./url.js');
23
- var async = require('./async.js');
24
- var file = require('./file.js');
25
- var watermark = require('./watermark.js');
26
- var func = require('./func.js');
27
- var random = require('./random.js');
28
- var number = require('./number.js');
29
- var unique = require('./unique.js');
30
- var tooltip = require('./tooltip.js');
31
- var tree = require('./tree.js');
32
- var math = require('./math.js');
33
- var base64 = require('./base64.js');
34
- var validator = require('./validator.js');
35
- var variable = require('./variable.js');
36
- var cloneDeep = require('./cloneDeep.js');
37
- var isEqual = require('./isEqual.js');
38
- var unicodeToolkit = require('./unicodeToolkit.js');
11
+ var array = require('./array.cjs');
12
+ var clipboard = require('./clipboard.cjs');
13
+ var cookie = require('./cookie.cjs');
14
+ var date = require('./date.cjs');
15
+ var dom = require('./dom.cjs');
16
+ var download = require('./download.cjs');
17
+ var object = require('./object.cjs');
18
+ var path = require('./path.cjs');
19
+ var qs = require('./qs.cjs');
20
+ var string = require('./string.cjs');
21
+ var type = require('./type.cjs');
22
+ var url = require('./url.cjs');
23
+ var async = require('./async.cjs');
24
+ var file = require('./file.cjs');
25
+ var watermark = require('./watermark.cjs');
26
+ var func = require('./func.cjs');
27
+ var random = require('./random.cjs');
28
+ var number = require('./number.cjs');
29
+ var unique = require('./unique.cjs');
30
+ var tooltip = require('./tooltip.cjs');
31
+ var tree = require('./tree.cjs');
32
+ var math = require('./math.cjs');
33
+ var base64 = require('./base64.cjs');
34
+ var validator = require('./validator.cjs');
35
+ var variable = require('./variable.cjs');
36
+ var cloneDeep = require('./cloneDeep.cjs');
37
+ var isEqual = require('./isEqual.cjs');
38
+ var unicodeToolkit = require('./unicodeToolkit.cjs');
39
+
40
+ var index = {
41
+ ...array,
42
+ ...clipboard,
43
+ ...cookie,
44
+ ...date,
45
+ ...dom,
46
+ ...download,
47
+ ...object,
48
+ ...path,
49
+ ...qs,
50
+ ...string,
51
+ ...type,
52
+ ...url,
53
+ ...async,
54
+ ...file,
55
+ ...watermark,
56
+ ...func,
57
+ ...random,
58
+ ...number,
59
+ ...unique,
60
+ ...tooltip,
61
+ ...tree,
62
+ ...math,
63
+ ...base64,
64
+ ...validator,
65
+ ...variable,
66
+ ...cloneDeep,
67
+ ...isEqual,
68
+ ...unicodeToolkit
69
+ };
39
70
 
40
71
  exports.arrayEach = array.arrayEach;
41
72
  exports.arrayEachAsync = array.arrayEachAsync;
@@ -113,7 +144,7 @@ exports.isString = type.isString;
113
144
  exports.isSymbol = type.isSymbol;
114
145
  exports.isUndefined = type.isUndefined;
115
146
  exports.objectHas = type.objectHas;
116
- exports.typeIs = type.default;
147
+ exports.typeIs = type.typeIs;
117
148
  exports.urlDelParams = url.urlDelParams;
118
149
  exports.urlParse = url.urlParse;
119
150
  exports.urlSetParams = url.urlSetParams;
@@ -185,3 +216,4 @@ exports.uniqueSymbol = variable.uniqueSymbol;
185
216
  exports.cloneDeep = cloneDeep.cloneDeep;
186
217
  exports.isEqual = isEqual.isEqual;
187
218
  exports.UnicodeToolkit = unicodeToolkit.UnicodeToolkit;
219
+ exports.default = index;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 使用位运算或常量定义常用 Tag,这里保持字符串以匹配 Object.prototype.toString
@@ -208,5 +208,9 @@ function deepCompareObject(a, b, stack) {
208
208
  }
209
209
  return true;
210
210
  }
211
+ var isEqual_default = {
212
+ isEqual
213
+ };
211
214
 
215
+ exports.default = isEqual_default;
212
216
  exports.isEqual = isEqual;
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * sculp-js v1.18.2
2
+ * sculp-js v1.19.0
3
3
  * (c) 2023-present chandq
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
7
  'use strict';
8
8
 
9
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
10
10
 
11
11
  /**
12
12
  * 数值安全乘法
@@ -76,8 +76,16 @@ const divide = (arg1, arg2) => {
76
76
  function strip(num, precision = 15) {
77
77
  return +parseFloat(Number(num).toPrecision(precision));
78
78
  }
79
+ var math = {
80
+ add,
81
+ subtract,
82
+ multiply,
83
+ divide,
84
+ strip
85
+ };
79
86
 
80
87
  exports.add = add;
88
+ exports.default = math;
81
89
  exports.divide = divide;
82
90
  exports.multiply = multiply;
83
91
  exports.strip = strip;