@daysnap/utils 0.1.15 → 0.1.16

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 (58) hide show
  1. package/docs/classes/Poller.md +9 -9
  2. package/docs/classes/Storage.md +13 -13
  3. package/docs/interfaces/EventBusCallback.md +1 -1
  4. package/docs/interfaces/PollerOptions.md +1 -1
  5. package/docs/interfaces/StorageManager.md +4 -4
  6. package/docs/interfaces/Trap.md +5 -5
  7. package/docs/modules.md +267 -142
  8. package/es/chunk-BZ6JSRMY.js +8 -0
  9. package/es/chunk-MOZPLBC3.js +8 -0
  10. package/es/chunk-OOWZEABP.js +8 -0
  11. package/es/chunk-PXMH56CM.js +8 -0
  12. package/es/chunk-UDRRKKBB.js +12 -0
  13. package/es/crToBr.d.ts +6 -0
  14. package/es/crToBr.js +6 -0
  15. package/es/crlfToBr.d.ts +11 -0
  16. package/es/crlfToBr.js +8 -0
  17. package/es/filterEmptyValue.js +2 -2
  18. package/es/getDaysOfMonth.d.ts +6 -0
  19. package/es/getDaysOfMonth.js +6 -0
  20. package/es/index.d.ts +5 -1
  21. package/es/index.js +113 -95
  22. package/es/isLeapYear.d.ts +7 -0
  23. package/es/isLeapYear.js +6 -0
  24. package/es/lfToBr.d.ts +6 -0
  25. package/es/lfToBr.js +6 -0
  26. package/es/storage/index.js +3 -3
  27. package/es/stringifyQuery.js +2 -2
  28. package/lib/chunk-EUH2FDMT.cjs +8 -0
  29. package/lib/chunk-TMCJ3HTA.cjs +12 -0
  30. package/lib/chunk-UTUKZLEN.cjs +8 -0
  31. package/lib/chunk-XSCXPGEI.cjs +8 -0
  32. package/lib/chunk-ZSDKKWIQ.cjs +8 -0
  33. package/lib/crToBr.cjs +6 -0
  34. package/lib/crToBr.d.cts +6 -0
  35. package/lib/crlfToBr.cjs +8 -0
  36. package/lib/crlfToBr.d.cts +11 -0
  37. package/lib/filterEmptyValue.cjs +3 -3
  38. package/lib/getDaysOfMonth.cjs +6 -0
  39. package/lib/getDaysOfMonth.d.cts +6 -0
  40. package/lib/index.cjs +82 -64
  41. package/lib/index.d.cts +5 -1
  42. package/lib/isLeapYear.cjs +6 -0
  43. package/lib/isLeapYear.d.cts +7 -0
  44. package/lib/lfToBr.cjs +6 -0
  45. package/lib/lfToBr.d.cts +6 -0
  46. package/lib/storage/index.cjs +2 -2
  47. package/lib/stringifyQuery.cjs +3 -3
  48. package/package.json +1 -1
  49. package/es/chunk-S2FOFDX4.js +0 -8
  50. package/es/filterCRLF.d.ts +0 -6
  51. package/es/filterCRLF.js +0 -6
  52. package/lib/chunk-CXDOHSIF.cjs +0 -8
  53. package/lib/filterCRLF.cjs +0 -6
  54. package/lib/filterCRLF.d.cts +0 -6
  55. package/es/{chunk-HNVHVI6P.js → chunk-SMNIKKYG.js} +3 -3
  56. package/es/{chunk-VDXSQKQF.js → chunk-WXXFRKUS.js} +3 -3
  57. package/lib/{chunk-UFBP3XOL.cjs → chunk-4P4EJVBW.cjs} +3 -3
  58. package/lib/{chunk-73AXP7FD.cjs → chunk-4USHGA4P.cjs} +2 -2
@@ -0,0 +1,8 @@
1
+ // src/crToBr.ts
2
+ function crToBr(v) {
3
+ return v ? v.replace(/\r/gi, "<br/>") : v;
4
+ }
5
+
6
+ export {
7
+ crToBr
8
+ };
@@ -0,0 +1,8 @@
1
+ // src/isLeapYear.ts
2
+ function isLeapYear(year) {
3
+ return year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
4
+ }
5
+
6
+ export {
7
+ isLeapYear
8
+ };
@@ -0,0 +1,8 @@
1
+ // src/getDaysOfMonth.ts
2
+ function getDaysOfMonth(year, month) {
3
+ return new Date(year, month, 0).getDate();
4
+ }
5
+
6
+ export {
7
+ getDaysOfMonth
8
+ };
@@ -0,0 +1,8 @@
1
+ // src/lfToBr.ts
2
+ function lfToBr(v) {
3
+ return v ? v.replace(/\n/gi, "<br/>") : v;
4
+ }
5
+
6
+ export {
7
+ lfToBr
8
+ };
@@ -0,0 +1,12 @@
1
+ // src/crlfToBr.ts
2
+ function crlfToBr(v) {
3
+ return v ? v.replace(/\r|\n/gi, "<br/>") : v;
4
+ }
5
+ function filterCRLF(v) {
6
+ return v.replace(/\r|\n/gi, "<br/>");
7
+ }
8
+
9
+ export {
10
+ crlfToBr,
11
+ filterCRLF
12
+ };
package/es/crToBr.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * \r to <br/>
3
+ */
4
+ declare function crToBr(v: string): string;
5
+
6
+ export { crToBr };
package/es/crToBr.js ADDED
@@ -0,0 +1,6 @@
1
+ import {
2
+ crToBr
3
+ } from "./chunk-BZ6JSRMY.js";
4
+ export {
5
+ crToBr
6
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * \r \n to <br/>
3
+ */
4
+ declare function crlfToBr(v: string): string;
5
+ /**
6
+ * 替换字符串里面的回车换行符
7
+ * @deprecated 请使用 @see {@link crlfToBr}.
8
+ */
9
+ declare function filterCRLF(v: string): string;
10
+
11
+ export { crlfToBr, filterCRLF };
package/es/crlfToBr.js ADDED
@@ -0,0 +1,8 @@
1
+ import {
2
+ crlfToBr,
3
+ filterCRLF
4
+ } from "./chunk-UDRRKKBB.js";
5
+ export {
6
+ crlfToBr,
7
+ filterCRLF
8
+ };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  filterEmptyValue
3
- } from "./chunk-HNVHVI6P.js";
3
+ } from "./chunk-SMNIKKYG.js";
4
+ import "./chunk-YGV2UKBN.js";
4
5
  import "./chunk-ELR2DZ56.js";
5
6
  import "./chunk-GVYBTJDA.js";
6
7
  import "./chunk-WCZPEH7E.js";
7
- import "./chunk-YGV2UKBN.js";
8
8
  import "./chunk-3KRJNCKB.js";
9
9
  import "./chunk-KOOGLWJ5.js";
10
10
  import "./chunk-CSZ7G34M.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 获取一个月当中的天数
3
+ */
4
+ declare function getDaysOfMonth(year: number, month: number): number;
5
+
6
+ export { getDaysOfMonth };
@@ -0,0 +1,6 @@
1
+ import {
2
+ getDaysOfMonth
3
+ } from "./chunk-OOWZEABP.js";
4
+ export {
5
+ getDaysOfMonth
6
+ };
package/es/index.d.ts CHANGED
@@ -11,10 +11,12 @@ export { clone } from './clone.js';
11
11
  export { cloneSimple } from './cloneSimple.js';
12
12
  export { compareVersion } from './compareVersion.js';
13
13
  export { compressImage } from './compressImage.js';
14
+ export { crToBr } from './crToBr.js';
14
15
  export { createFactory } from './createFactory.js';
15
16
  export { colorGenByHash } from './createHexColorByHash.js';
16
17
  export { createLinearFunction } from './createLinearFunction.js';
17
18
  export { createWithLoading } from './createWithLoading.js';
19
+ export { crlfToBr, filterCRLF } from './crlfToBr.js';
18
20
  export { debounce } from './debounce.js';
19
21
  export { atob, btoa } from './decode.js';
20
22
  export { downloadFile } from './downloadFile.js';
@@ -22,7 +24,6 @@ export { each } from './each.js';
22
24
  export { EventBusCallback, eventBus } from './eventBus.js';
23
25
  export { exitFullscreen } from './exitFullscreen.js';
24
26
  export { filterBankCardNo } from './filterBankCardNo.js';
25
- export { filterCRLF } from './filterCRLF.js';
26
27
  export { filterEmoji } from './filterEmoji.js';
27
28
  export { filterEmptyValue } from './filterEmptyValue.js';
28
29
  export { filterIdCard } from './filterIdCard.js';
@@ -39,6 +40,7 @@ export { formatPathParams } from './formatPathParams.js';
39
40
  export { getBlobByUrl } from './getBlobByUrl.js';
40
41
  export { getDateBoundsByMonths } from './getDateBoundsByMonths.js';
41
42
  export { getDayMillisecond } from './getDayMillisecond.js';
43
+ export { getDaysOfMonth } from './getDaysOfMonth.js';
42
44
  export { getImageInfo } from './getImageInfo.js';
43
45
  export { getMonthBounds } from './getMonthBounds.js';
44
46
  export { getRandom } from './getRandom.js';
@@ -70,6 +72,7 @@ export { isIOS } from './isIOS.js';
70
72
  export { isIdCard } from './isIdCard.js';
71
73
  export { isJSONString } from './isJSONString.js';
72
74
  export { isLan } from './isLan.js';
75
+ export { isLeapYear } from './isLeapYear.js';
73
76
  export { isLicenseCode } from './isLicenseCode.js';
74
77
  export { isMobile } from './isMobile.js';
75
78
  export { isNativeFunction } from './isNativeFunction.js';
@@ -88,6 +91,7 @@ export { isWeChat, isWeixin } from './isWeChat.js';
88
91
  export { isWeChatMiniProgram } from './isWeChatMiniProgram.js';
89
92
  export { isWindow } from './isWindow.js';
90
93
  export { kebabCase } from './kebabCase.js';
94
+ export { lfToBr } from './lfToBr.js';
91
95
  export { listGenerator } from './listGenerator.js';
92
96
  export { makePhoneCall } from './makePhoneCall.js';
93
97
  export { mousewheel } from './mousewheel.js';
package/es/index.js CHANGED
@@ -1,10 +1,34 @@
1
+ import {
2
+ typeOf
3
+ } from "./chunk-MTF3ACKC.js";
4
+ import {
5
+ withCache
6
+ } from "./chunk-ZI7MCCMB.js";
7
+ import {
8
+ withPreventConsecutiveClicks
9
+ } from "./chunk-S6UH3LMW.js";
1
10
  import {
2
11
  getCache,
3
12
  getLocal
4
13
  } from "./chunk-LG2TIXRB.js";
14
+ import {
15
+ factory
16
+ } from "./chunk-M6B3UGFI.js";
5
17
  import {
6
18
  Storage
7
19
  } from "./chunk-56QUZDMU.js";
20
+ import {
21
+ splitArray
22
+ } from "./chunk-BNF4U7EJ.js";
23
+ import {
24
+ stringTrim
25
+ } from "./chunk-IF7JMIDO.js";
26
+ import {
27
+ stringifyQuery
28
+ } from "./chunk-WXXFRKUS.js";
29
+ import {
30
+ stringifyQueryString
31
+ } from "./chunk-TSFGLHCP.js";
8
32
  import {
9
33
  throttle,
10
34
  throttleLeading,
@@ -21,17 +45,17 @@ import {
21
45
  trap
22
46
  } from "./chunk-LOPD7SSH.js";
23
47
  import {
24
- typeOf
25
- } from "./chunk-MTF3ACKC.js";
48
+ replaceCrlf
49
+ } from "./chunk-GNGSV7F7.js";
26
50
  import {
27
- withCache
28
- } from "./chunk-ZI7MCCMB.js";
51
+ requestFullScreen
52
+ } from "./chunk-MQDWCBXD.js";
29
53
  import {
30
- withPreventConsecutiveClicks
31
- } from "./chunk-S6UH3LMW.js";
54
+ reserve
55
+ } from "./chunk-TXWIC3L7.js";
32
56
  import {
33
- factory
34
- } from "./chunk-M6B3UGFI.js";
57
+ rgbToHex
58
+ } from "./chunk-KZJIPHQB.js";
35
59
  import {
36
60
  round
37
61
  } from "./chunk-4BFL6RXS.js";
@@ -42,17 +66,14 @@ import {
42
66
  setScrollTop
43
67
  } from "./chunk-BULTIEJG.js";
44
68
  import {
45
- splitArray
46
- } from "./chunk-BNF4U7EJ.js";
47
- import {
48
- stringTrim
49
- } from "./chunk-IF7JMIDO.js";
69
+ parseError
70
+ } from "./chunk-EJMUWNXI.js";
50
71
  import {
51
- stringifyQuery
52
- } from "./chunk-VDXSQKQF.js";
72
+ parseObject
73
+ } from "./chunk-M3NXNABN.js";
53
74
  import {
54
- stringifyQueryString
55
- } from "./chunk-TSFGLHCP.js";
75
+ parseQuery
76
+ } from "./chunk-WFPQI6HC.js";
56
77
  import {
57
78
  parseQueryString
58
79
  } from "./chunk-SZ7IZE42.js";
@@ -69,17 +90,14 @@ import {
69
90
  sleep
70
91
  } from "./chunk-TNIIDDN4.js";
71
92
  import {
72
- replaceCrlf
73
- } from "./chunk-GNGSV7F7.js";
74
- import {
75
- requestFullScreen
76
- } from "./chunk-MQDWCBXD.js";
93
+ makePhoneCall
94
+ } from "./chunk-GYOXULKV.js";
77
95
  import {
78
- reserve
79
- } from "./chunk-TXWIC3L7.js";
96
+ mousewheel
97
+ } from "./chunk-GVPHHNDY.js";
80
98
  import {
81
- rgbToHex
82
- } from "./chunk-KZJIPHQB.js";
99
+ nf
100
+ } from "./chunk-PAERS3SW.js";
83
101
  import {
84
102
  normalizePath
85
103
  } from "./chunk-CMP4T3ZH.js";
@@ -93,14 +111,15 @@ import {
93
111
  parseDate
94
112
  } from "./chunk-DWT2WM6H.js";
95
113
  import {
96
- parseError
97
- } from "./chunk-EJMUWNXI.js";
114
+ isUrl
115
+ } from "./chunk-D5O4LXN3.js";
98
116
  import {
99
- parseObject
100
- } from "./chunk-M3NXNABN.js";
117
+ isValidDate
118
+ } from "./chunk-S6ZV2M6N.js";
101
119
  import {
102
- parseQuery
103
- } from "./chunk-WFPQI6HC.js";
120
+ isWeChat,
121
+ isWeixin
122
+ } from "./chunk-UCDNFQ3U.js";
104
123
  import {
105
124
  isWeChatMiniProgram
106
125
  } from "./chunk-SQ3L6IQW.js";
@@ -111,14 +130,14 @@ import {
111
130
  kebabCase
112
131
  } from "./chunk-IPIA4Z65.js";
113
132
  import {
114
- makePhoneCall
115
- } from "./chunk-GYOXULKV.js";
133
+ lfToBr
134
+ } from "./chunk-PXMH56CM.js";
116
135
  import {
117
- mousewheel
118
- } from "./chunk-GVPHHNDY.js";
136
+ isNumber
137
+ } from "./chunk-NCFA5IXM.js";
119
138
  import {
120
- nf
121
- } from "./chunk-PAERS3SW.js";
139
+ isPhone
140
+ } from "./chunk-IJD4RHXI.js";
122
141
  import {
123
142
  isPromise
124
143
  } from "./chunk-LJ4CEJ5C.js";
@@ -129,18 +148,17 @@ import {
129
148
  isType
130
149
  } from "./chunk-5EVWQVDV.js";
131
150
  import {
132
- isUrl
133
- } from "./chunk-D5O4LXN3.js";
134
- import {
135
- isValidDate
136
- } from "./chunk-S6ZV2M6N.js";
151
+ isIdCard
152
+ } from "./chunk-UXSZFM5G.js";
137
153
  import {
138
- isWeChat,
139
- isWeixin
140
- } from "./chunk-UCDNFQ3U.js";
154
+ isJSONString
155
+ } from "./chunk-IIIHPNUB.js";
141
156
  import {
142
157
  isLan
143
158
  } from "./chunk-VTSGSUL2.js";
159
+ import {
160
+ isLeapYear
161
+ } from "./chunk-MOZPLBC3.js";
144
162
  import {
145
163
  isLicenseCode
146
164
  } from "./chunk-576ZRCUO.js";
@@ -151,11 +169,8 @@ import {
151
169
  isNativeFunction
152
170
  } from "./chunk-4N33UIAB.js";
153
171
  import {
154
- isNumber
155
- } from "./chunk-NCFA5IXM.js";
156
- import {
157
- isPhone
158
- } from "./chunk-IJD4RHXI.js";
172
+ isEmail
173
+ } from "./chunk-JMUWQLHE.js";
159
174
  import {
160
175
  isError
161
176
  } from "./chunk-6UGTRW2S.js";
@@ -166,11 +181,11 @@ import {
166
181
  isIOS
167
182
  } from "./chunk-5BVFSCCX.js";
168
183
  import {
169
- isIdCard
170
- } from "./chunk-UXSZFM5G.js";
184
+ insertScript
185
+ } from "./chunk-SCEONZUJ.js";
171
186
  import {
172
- isJSONString
173
- } from "./chunk-IIIHPNUB.js";
187
+ insertStyle
188
+ } from "./chunk-FY3PSILS.js";
174
189
  import {
175
190
  isAmount
176
191
  } from "./chunk-YKTD7CLE.js";
@@ -187,8 +202,11 @@ import {
187
202
  isDate
188
203
  } from "./chunk-A4YRDVZ4.js";
189
204
  import {
190
- isEmail
191
- } from "./chunk-JMUWQLHE.js";
205
+ getRangeDate
206
+ } from "./chunk-JZKIIY3L.js";
207
+ import {
208
+ getScrollTop
209
+ } from "./chunk-EFDRCKKS.js";
192
210
  import {
193
211
  getVideoInfo
194
212
  } from "./chunk-3ZZPPKM3.js";
@@ -205,14 +223,14 @@ import {
205
223
  insertLink
206
224
  } from "./chunk-FIHEVMN6.js";
207
225
  import {
208
- insertScript
209
- } from "./chunk-SCEONZUJ.js";
210
- import {
211
- insertStyle
212
- } from "./chunk-FY3PSILS.js";
226
+ getDateBoundsByMonths
227
+ } from "./chunk-HNKJXGCC.js";
213
228
  import {
214
229
  getDayMillisecond
215
230
  } from "./chunk-ZGN3KUXE.js";
231
+ import {
232
+ getDaysOfMonth
233
+ } from "./chunk-OOWZEABP.js";
216
234
  import {
217
235
  getImageInfo
218
236
  } from "./chunk-ANF3VZYM.js";
@@ -232,14 +250,20 @@ import {
232
250
  listGenerator
233
251
  } from "./chunk-2SUOLGG5.js";
234
252
  import {
235
- getRangeDate
236
- } from "./chunk-JZKIIY3L.js";
237
- import {
238
- getScrollTop
239
- } from "./chunk-EFDRCKKS.js";
253
+ formatDateToZN
254
+ } from "./chunk-WXD7J2FR.js";
240
255
  import {
241
256
  formatAmount
242
257
  } from "./chunk-KDND6GRD.js";
258
+ import {
259
+ formatDate
260
+ } from "./chunk-UMJU7UF2.js";
261
+ import {
262
+ normalizeDate
263
+ } from "./chunk-A3YS6665.js";
264
+ import {
265
+ isString
266
+ } from "./chunk-F4QMON2N.js";
243
267
  import {
244
268
  formatDateStr
245
269
  } from "./chunk-3MBFDHEW.js";
@@ -259,17 +283,20 @@ import {
259
283
  getBlobByUrl
260
284
  } from "./chunk-4QMOXXPL.js";
261
285
  import {
262
- getDateBoundsByMonths
263
- } from "./chunk-HNKJXGCC.js";
286
+ exitFullscreen
287
+ } from "./chunk-GV4IJGB2.js";
264
288
  import {
265
- filterCRLF
266
- } from "./chunk-S2FOFDX4.js";
289
+ filterBankCardNo
290
+ } from "./chunk-JKCLDPOC.js";
267
291
  import {
268
292
  filterEmoji
269
293
  } from "./chunk-CNCI66H4.js";
270
294
  import {
271
295
  filterEmptyValue
272
- } from "./chunk-HNVHVI6P.js";
296
+ } from "./chunk-SMNIKKYG.js";
297
+ import {
298
+ isEmpty
299
+ } from "./chunk-YGV2UKBN.js";
273
300
  import {
274
301
  isEmptyArray
275
302
  } from "./chunk-ELR2DZ56.js";
@@ -279,9 +306,6 @@ import {
279
306
  import {
280
307
  isFunction
281
308
  } from "./chunk-WCZPEH7E.js";
282
- import {
283
- isEmpty
284
- } from "./chunk-YGV2UKBN.js";
285
309
  import {
286
310
  isUndefined
287
311
  } from "./chunk-3KRJNCKB.js";
@@ -301,20 +325,15 @@ import {
301
325
  filterString
302
326
  } from "./chunk-KJX7IWF5.js";
303
327
  import {
304
- formatDateToZN
305
- } from "./chunk-WXD7J2FR.js";
306
- import {
307
- formatDate
308
- } from "./chunk-UMJU7UF2.js";
309
- import {
310
- normalizeDate
311
- } from "./chunk-A3YS6665.js";
312
- import {
313
- isString
314
- } from "./chunk-F4QMON2N.js";
328
+ createLinearFunction
329
+ } from "./chunk-53VI5KBY.js";
315
330
  import {
316
331
  createWithLoading
317
332
  } from "./chunk-OC64NXZ2.js";
333
+ import {
334
+ crlfToBr,
335
+ filterCRLF
336
+ } from "./chunk-UDRRKKBB.js";
318
337
  import {
319
338
  debounce
320
339
  } from "./chunk-FBJWICWM.js";
@@ -331,12 +350,6 @@ import {
331
350
  import {
332
351
  eventBus
333
352
  } from "./chunk-HYCW7PL5.js";
334
- import {
335
- exitFullscreen
336
- } from "./chunk-GV4IJGB2.js";
337
- import {
338
- filterBankCardNo
339
- } from "./chunk-JKCLDPOC.js";
340
353
  import {
341
354
  clamp
342
355
  } from "./chunk-W52BRMSD.js";
@@ -358,15 +371,15 @@ import {
358
371
  import {
359
372
  compressImage
360
373
  } from "./chunk-ZUMPS2U2.js";
374
+ import {
375
+ crToBr
376
+ } from "./chunk-BZ6JSRMY.js";
361
377
  import {
362
378
  createFactory
363
379
  } from "./chunk-T22U5E3X.js";
364
380
  import {
365
381
  colorGenByHash
366
382
  } from "./chunk-ADGGLX7E.js";
367
- import {
368
- createLinearFunction
369
- } from "./chunk-53VI5KBY.js";
370
383
  import {
371
384
  ato
372
385
  } from "./chunk-KEADPNJL.js";
@@ -410,10 +423,12 @@ export {
410
423
  colorGenByHash,
411
424
  compareVersion,
412
425
  compressImage,
426
+ crToBr,
413
427
  createFactory,
414
428
  createLinearFunction,
415
429
  createTrapInstance,
416
430
  createWithLoading,
431
+ crlfToBr,
417
432
  debounce,
418
433
  downloadFile,
419
434
  each,
@@ -439,6 +454,7 @@ export {
439
454
  getCache,
440
455
  getDateBoundsByMonths,
441
456
  getDayMillisecond,
457
+ getDaysOfMonth,
442
458
  getImageInfo,
443
459
  getLocal,
444
460
  getMonthBounds,
@@ -471,6 +487,7 @@ export {
471
487
  isIdCard,
472
488
  isJSONString,
473
489
  isLan,
490
+ isLeapYear,
474
491
  isLicenseCode,
475
492
  isMobile,
476
493
  isNativeFunction,
@@ -490,6 +507,7 @@ export {
490
507
  isWeixin,
491
508
  isWindow,
492
509
  kebabCase,
510
+ lfToBr,
493
511
  listGenerator,
494
512
  makePhoneCall,
495
513
  mousewheel,
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 判断是否是闰年
3
+ * 规则:四年一闰,百年不闰,四百年再闰
4
+ */
5
+ declare function isLeapYear(year: number): boolean;
6
+
7
+ export { isLeapYear };
@@ -0,0 +1,6 @@
1
+ import {
2
+ isLeapYear
3
+ } from "./chunk-MOZPLBC3.js";
4
+ export {
5
+ isLeapYear
6
+ };
package/es/lfToBr.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * \n to <br/>
3
+ */
4
+ declare function lfToBr(v: string): string;
5
+
6
+ export { lfToBr };
package/es/lfToBr.js ADDED
@@ -0,0 +1,6 @@
1
+ import {
2
+ lfToBr
3
+ } from "./chunk-PXMH56CM.js";
4
+ export {
5
+ lfToBr
6
+ };
@@ -2,12 +2,12 @@ import {
2
2
  getCache,
3
3
  getLocal
4
4
  } from "../chunk-LG2TIXRB.js";
5
- import {
6
- Storage
7
- } from "../chunk-56QUZDMU.js";
8
5
  import {
9
6
  factory
10
7
  } from "../chunk-M6B3UGFI.js";
8
+ import {
9
+ Storage
10
+ } from "../chunk-56QUZDMU.js";
11
11
  import "../chunk-CSZ7G34M.js";
12
12
  import "../chunk-XCSSSEK2.js";
13
13
  export {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  stringifyQuery
3
- } from "./chunk-VDXSQKQF.js";
4
- import "./chunk-GVYBTJDA.js";
3
+ } from "./chunk-WXXFRKUS.js";
5
4
  import "./chunk-F4QMON2N.js";
5
+ import "./chunk-GVYBTJDA.js";
6
6
  export {
7
7
  stringifyQuery
8
8
  };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/getDaysOfMonth.ts
2
+ function getDaysOfMonth(year, month) {
3
+ return new Date(year, month, 0).getDate();
4
+ }
5
+
6
+
7
+
8
+ exports.getDaysOfMonth = getDaysOfMonth;
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/crlfToBr.ts
2
+ function crlfToBr(v) {
3
+ return v ? v.replace(/\r|\n/gi, "<br/>") : v;
4
+ }
5
+ function filterCRLF(v) {
6
+ return v.replace(/\r|\n/gi, "<br/>");
7
+ }
8
+
9
+
10
+
11
+
12
+ exports.crlfToBr = crlfToBr; exports.filterCRLF = filterCRLF;
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/isLeapYear.ts
2
+ function isLeapYear(year) {
3
+ return year % 400 === 0 || year % 100 !== 0 && year % 4 === 0;
4
+ }
5
+
6
+
7
+
8
+ exports.isLeapYear = isLeapYear;
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/lfToBr.ts
2
+ function lfToBr(v) {
3
+ return v ? v.replace(/\n/gi, "<br/>") : v;
4
+ }
5
+
6
+
7
+
8
+ exports.lfToBr = lfToBr;
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/crToBr.ts
2
+ function crToBr(v) {
3
+ return v ? v.replace(/\r/gi, "<br/>") : v;
4
+ }
5
+
6
+
7
+
8
+ exports.crToBr = crToBr;
package/lib/crToBr.cjs ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkZSDKKWIQcjs = require('./chunk-ZSDKKWIQ.cjs');
4
+
5
+
6
+ exports.crToBr = _chunkZSDKKWIQcjs.crToBr;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * \r to <br/>
3
+ */
4
+ declare function crToBr(v: string): string;
5
+
6
+ export { crToBr };