@daysnap/utils 0.1.18 → 0.1.20

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 (85) hide show
  1. package/docs/classes/Poller.md +151 -0
  2. package/docs/classes/Storage.md +13 -13
  3. package/docs/interfaces/EventBusCallback.md +1 -1
  4. package/docs/interfaces/PollerOptions.md +19 -0
  5. package/docs/interfaces/StorageManager.md +4 -4
  6. package/docs/interfaces/Trap.md +5 -5
  7. package/docs/modules.md +364 -144
  8. package/es/blobToBase64.d.ts +1 -1
  9. package/es/blobToBase64.js +1 -1
  10. package/es/chunk-AAKGIVZB.js +21 -0
  11. package/es/chunk-BZ6JSRMY.js +8 -0
  12. package/es/chunk-EH6HUV2G.js +9 -0
  13. package/es/chunk-GLJALZRT.js +43 -0
  14. package/es/chunk-KH7MPMQF.js +15 -0
  15. package/es/chunk-MOZPLBC3.js +8 -0
  16. package/es/chunk-OOWZEABP.js +8 -0
  17. package/es/chunk-PXMH56CM.js +8 -0
  18. package/es/chunk-UDRRKKBB.js +12 -0
  19. package/es/crToBr.d.ts +6 -0
  20. package/es/crToBr.js +6 -0
  21. package/es/crlfToBr.d.ts +11 -0
  22. package/es/crlfToBr.js +8 -0
  23. package/es/filterEmptyValue.js +3 -3
  24. package/es/formatGapDate.d.ts +6 -0
  25. package/es/formatGapDate.js +6 -0
  26. package/es/getDateBoundsByMonths.d.ts +1 -1
  27. package/es/getDaysOfMonth.d.ts +6 -0
  28. package/es/getDaysOfMonth.js +6 -0
  29. package/es/getMonthBounds.d.ts +1 -1
  30. package/es/getWeekBounds.d.ts +7 -0
  31. package/es/getWeekBounds.js +9 -0
  32. package/es/index.d.ts +8 -1
  33. package/es/index.js +125 -95
  34. package/es/isLeapYear.d.ts +7 -0
  35. package/es/isLeapYear.js +6 -0
  36. package/es/lfToBr.d.ts +6 -0
  37. package/es/lfToBr.js +6 -0
  38. package/es/poller.d.ts +20 -0
  39. package/es/poller.js +7 -0
  40. package/es/stringifyQuery.js +2 -2
  41. package/lib/blobToBase64.cjs +2 -2
  42. package/lib/blobToBase64.d.cts +1 -1
  43. package/lib/chunk-4WWOJSX3.cjs +21 -0
  44. package/lib/chunk-EUH2FDMT.cjs +8 -0
  45. package/lib/chunk-TDUDOSU4.cjs +43 -0
  46. package/lib/chunk-TMCJ3HTA.cjs +12 -0
  47. package/lib/chunk-UTUKZLEN.cjs +8 -0
  48. package/lib/chunk-XSCXPGEI.cjs +8 -0
  49. package/lib/{chunk-CDHFRZQM.cjs → chunk-YIW4PW4Q.cjs} +2 -8
  50. package/lib/chunk-Z42N5FUV.cjs +9 -0
  51. package/lib/chunk-ZSDKKWIQ.cjs +8 -0
  52. package/lib/crToBr.cjs +6 -0
  53. package/lib/crToBr.d.cts +6 -0
  54. package/lib/crlfToBr.cjs +8 -0
  55. package/lib/crlfToBr.d.cts +11 -0
  56. package/lib/filterEmptyValue.cjs +4 -4
  57. package/lib/formatGapDate.cjs +6 -0
  58. package/lib/formatGapDate.d.cts +6 -0
  59. package/lib/getDateBoundsByMonths.d.cts +1 -1
  60. package/lib/getDaysOfMonth.cjs +6 -0
  61. package/lib/getDaysOfMonth.d.cts +6 -0
  62. package/lib/getMonthBounds.d.cts +1 -1
  63. package/lib/getWeekBounds.cjs +9 -0
  64. package/lib/getWeekBounds.d.cts +7 -0
  65. package/lib/index.cjs +99 -69
  66. package/lib/index.d.cts +8 -1
  67. package/lib/isLeapYear.cjs +6 -0
  68. package/lib/isLeapYear.d.cts +7 -0
  69. package/lib/lfToBr.cjs +6 -0
  70. package/lib/lfToBr.d.cts +6 -0
  71. package/lib/poller.cjs +7 -0
  72. package/lib/poller.d.cts +20 -0
  73. package/lib/stringifyQuery.cjs +3 -3
  74. package/package.json +1 -1
  75. package/es/chunk-HRKQWKOJ.js +0 -21
  76. package/es/chunk-S2FOFDX4.js +0 -8
  77. package/es/filterCRLF.d.ts +0 -6
  78. package/es/filterCRLF.js +0 -6
  79. package/lib/chunk-CXDOHSIF.cjs +0 -8
  80. package/lib/filterCRLF.cjs +0 -6
  81. package/lib/filterCRLF.d.cts +0 -6
  82. package/es/{chunk-NXEL6RMI.js → chunk-SMNIKKYG.js} +6 -6
  83. package/es/{chunk-VDXSQKQF.js → chunk-WXXFRKUS.js} +3 -3
  84. package/lib/{chunk-PYFTXKFI.cjs → chunk-4P4EJVBW.cjs} +4 -4
  85. package/lib/{chunk-73AXP7FD.cjs → chunk-4USHGA4P.cjs} +2 -2
@@ -1,21 +0,0 @@
1
- // src/blobToBase64.ts
2
- function blobToBase64(blob, contentType) {
3
- return new Promise((resolve, reject) => {
4
- const fileReader = new FileReader();
5
- fileReader.onload = (res) => {
6
- const result = res.target?.result;
7
- if (result && typeof result === "string" && contentType) {
8
- const [, data] = result.split(",");
9
- resolve(`data:${contentType};base64,${data}`);
10
- } else {
11
- resolve(result ?? "");
12
- }
13
- };
14
- fileReader.onerror = reject;
15
- fileReader.readAsDataURL(blob);
16
- });
17
- }
18
-
19
- export {
20
- blobToBase64
21
- };
@@ -1,8 +0,0 @@
1
- // src/filterCRLF.ts
2
- function filterCRLF(v) {
3
- return v.replace(/\r|\n/gi, "<br/>");
4
- }
5
-
6
- export {
7
- filterCRLF
8
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * 替换字符串里面的回车换行符
3
- */
4
- declare function filterCRLF(v: string): string;
5
-
6
- export { filterCRLF };
package/es/filterCRLF.js DELETED
@@ -1,6 +0,0 @@
1
- import {
2
- filterCRLF
3
- } from "./chunk-S2FOFDX4.js";
4
- export {
5
- filterCRLF
6
- };
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/filterCRLF.ts
2
- function filterCRLF(v) {
3
- return v.replace(/\r|\n/gi, "<br/>");
4
- }
5
-
6
-
7
-
8
- exports.filterCRLF = filterCRLF;
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkCXDOHSIFcjs = require('./chunk-CXDOHSIF.cjs');
4
-
5
-
6
- exports.filterCRLF = _chunkCXDOHSIFcjs.filterCRLF;
@@ -1,6 +0,0 @@
1
- /**
2
- * 替换字符串里面的回车换行符
3
- */
4
- declare function filterCRLF(v: string): string;
5
-
6
- export { filterCRLF };
@@ -1,15 +1,15 @@
1
- import {
2
- isEmptyObject
3
- } from "./chunk-GVYBTJDA.js";
4
- import {
5
- isFunction
6
- } from "./chunk-WCZPEH7E.js";
7
1
  import {
8
2
  isEmpty
9
3
  } from "./chunk-YGV2UKBN.js";
10
4
  import {
11
5
  isEmptyArray
12
6
  } from "./chunk-ELR2DZ56.js";
7
+ import {
8
+ isEmptyObject
9
+ } from "./chunk-GVYBTJDA.js";
10
+ import {
11
+ isFunction
12
+ } from "./chunk-WCZPEH7E.js";
13
13
  import {
14
14
  isObject
15
15
  } from "./chunk-XCSSSEK2.js";
@@ -1,9 +1,9 @@
1
- import {
2
- isEmptyObject
3
- } from "./chunk-GVYBTJDA.js";
4
1
  import {
5
2
  isString
6
3
  } from "./chunk-F4QMON2N.js";
4
+ import {
5
+ isEmptyObject
6
+ } from "./chunk-GVYBTJDA.js";
7
7
 
8
8
  // src/stringifyQuery.ts
9
9
  function stringifyQuery(v) {
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5XVQSGWZcjs = require('./chunk-5XVQSGWZ.cjs');
3
+ var _chunkA2J34A3Kcjs = require('./chunk-A2J34A3K.cjs');
4
4
 
5
5
 
6
- var _chunkOHDNJMMWcjs = require('./chunk-OHDNJMMW.cjs');
6
+ var _chunkX3A4TUQLcjs = require('./chunk-X3A4TUQL.cjs');
7
7
 
8
8
 
9
- var _chunkA2J34A3Kcjs = require('./chunk-A2J34A3K.cjs');
9
+ var _chunk5XVQSGWZcjs = require('./chunk-5XVQSGWZ.cjs');
10
10
 
11
11
 
12
- var _chunkX3A4TUQLcjs = require('./chunk-X3A4TUQL.cjs');
12
+ var _chunkOHDNJMMWcjs = require('./chunk-OHDNJMMW.cjs');
13
13
 
14
14
 
15
15
  var _chunkOSEQ7XR6cjs = require('./chunk-OSEQ7XR6.cjs');
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5XVQSGWZcjs = require('./chunk-5XVQSGWZ.cjs');
3
+ var _chunkT5JI3MECcjs = require('./chunk-T5JI3MEC.cjs');
4
4
 
5
5
 
6
- var _chunkT5JI3MECcjs = require('./chunk-T5JI3MEC.cjs');
6
+ var _chunk5XVQSGWZcjs = require('./chunk-5XVQSGWZ.cjs');
7
7
 
8
8
  // src/stringifyQuery.ts
9
9
  function stringifyQuery(v) {