jinbi-utils 1.0.0-beta.1

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 (72) hide show
  1. package/.babelrc +19 -0
  2. package/.cz-config.js +55 -0
  3. package/.dockerignore +3 -0
  4. package/.editorconfig +12 -0
  5. package/.eslintignore +8 -0
  6. package/.eslintrc.js +54 -0
  7. package/Dockerfile +3 -0
  8. package/README.md +160 -0
  9. package/api-extractor.json +15 -0
  10. package/commitlint.config.js +3 -0
  11. package/dist/index.esm.js +1277 -0
  12. package/dist/index.esm.min.js +15 -0
  13. package/dist/index.umd.js +1348 -0
  14. package/dist/index.umd.min.js +16 -0
  15. package/docs/assets/images/icons.png +0 -0
  16. package/docs/assets/images/icons@2x.png +0 -0
  17. package/docs/assets/images/widgets.png +0 -0
  18. package/docs/assets/images/widgets@2x.png +0 -0
  19. package/docs/assets/js/main.js +1 -0
  20. package/docs/assets/js/search.json +1 -0
  21. package/docs/globals.html +144 -0
  22. package/docs/index.html +147 -0
  23. package/docs/interfaces/file.compressimgqualitycallback.html +212 -0
  24. package/docs/interfaces/file.compressimgscalecallback.html +206 -0
  25. package/docs/interfaces/file.exportbyblobparams.html +294 -0
  26. package/docs/interfaces/file.filesizeobject.html +227 -0
  27. package/docs/interfaces/file.genexportbyblobparams.html +237 -0
  28. package/docs/modules/common.html +188 -0
  29. package/docs/modules/date.html +364 -0
  30. package/docs/modules/file.html +452 -0
  31. package/docs/modules/number.html +356 -0
  32. package/docs/modules/object.html +245 -0
  33. package/docs/modules/print.html +183 -0
  34. package/docs/modules/string.html +352 -0
  35. package/docs/modules/validate.html +389 -0
  36. package/jest.config.js +15 -0
  37. package/package.json +76 -0
  38. package/rollup.config.js +65 -0
  39. package/src/common/index.ts +323 -0
  40. package/src/constant/common.constant.ts +13 -0
  41. package/src/date/index.ts +143 -0
  42. package/src/file/index.ts +296 -0
  43. package/src/http/http.ts +79 -0
  44. package/src/http/httpEnums.ts +61 -0
  45. package/src/index.ts +10 -0
  46. package/src/number/index.ts +190 -0
  47. package/src/object/index.ts +54 -0
  48. package/src/print/index.ts +102 -0
  49. package/src/string/index.ts +111 -0
  50. package/src/validate/index.ts +78 -0
  51. package/src/wecom/wecom.ts +75 -0
  52. package/test/common/index.test.ts +19 -0
  53. package/test/date/index.test.ts +107 -0
  54. package/test/file/index.test.ts +104 -0
  55. package/test/number/index.test.ts +108 -0
  56. package/test/object/index.test.ts +20 -0
  57. package/test/string/index.test.ts +82 -0
  58. package/tsconfig.json +39 -0
  59. package/typedoc.json +9 -0
  60. package/types/common/index.d.ts +47 -0
  61. package/types/constant/common.constant.d.ts +12 -0
  62. package/types/date/index.d.ts +60 -0
  63. package/types/file/index.d.ts +96 -0
  64. package/types/http/http.d.ts +17 -0
  65. package/types/http/httpEnums.d.ts +53 -0
  66. package/types/index.d.ts +10 -0
  67. package/types/number/index.d.ts +62 -0
  68. package/types/object/index.d.ts +25 -0
  69. package/types/print/index.d.ts +11 -0
  70. package/types/string/index.d.ts +53 -0
  71. package/types/validate/index.d.ts +45 -0
  72. package/types/wecom/wecom.d.ts +3 -0
@@ -0,0 +1,237 @@
1
+ <!doctype html>
2
+ <html class="default no-js">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <title>GenExportByBlobParams | fe-utils</title>
7
+ <meta name="description" content="Documentation for fe-utils">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+ <link rel="stylesheet" href="../assets/css/main.css">
10
+ </head>
11
+ <body>
12
+ <header>
13
+ <div class="tsd-page-toolbar">
14
+ <div class="container">
15
+ <div class="table-wrap">
16
+ <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
17
+ <div class="field">
18
+ <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
19
+ <input id="tsd-search-field" type="text" />
20
+ </div>
21
+ <ul class="results">
22
+ <li class="state loading">Preparing search index...</li>
23
+ <li class="state failure">The search index is not available</li>
24
+ </ul>
25
+ <a href="../index.html" class="title">fe-utils</a>
26
+ </div>
27
+ <div class="table-cell" id="tsd-widgets">
28
+ <div id="tsd-filter">
29
+ <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
30
+ <div class="tsd-filter-group">
31
+ <div class="tsd-select" id="tsd-filter-visibility">
32
+ <span class="tsd-select-label">All</span>
33
+ <ul class="tsd-select-list">
34
+ <li data-value="public">Public</li>
35
+ <li data-value="protected">Public/Protected</li>
36
+ <li data-value="private" class="selected">All</li>
37
+ </ul>
38
+ </div>
39
+ <input type="checkbox" id="tsd-filter-inherited" checked />
40
+ <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
41
+ <input type="checkbox" id="tsd-filter-externals" checked />
42
+ <label class="tsd-widget" for="tsd-filter-externals">Externals</label>
43
+ </div>
44
+ </div>
45
+ <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div class="tsd-page-title">
51
+ <div class="container">
52
+ <ul class="tsd-breadcrumb">
53
+ <li>
54
+ <a href="../globals.html">Globals</a>
55
+ </li>
56
+ <li>
57
+ <a href="../modules/file.html">File</a>
58
+ </li>
59
+ <li>
60
+ <a href="file.genexportbyblobparams.html">GenExportByBlobParams</a>
61
+ </li>
62
+ </ul>
63
+ <h1>Interface GenExportByBlobParams</h1>
64
+ </div>
65
+ </div>
66
+ </header>
67
+ <div class="container container-main">
68
+ <div class="row">
69
+ <div class="col-8 col-content">
70
+ <section class="tsd-panel tsd-hierarchy">
71
+ <h3>Hierarchy</h3>
72
+ <ul class="tsd-hierarchy">
73
+ <li>
74
+ <span class="target">GenExportByBlobParams</span>
75
+ </li>
76
+ </ul>
77
+ </section>
78
+ <section class="tsd-panel-group tsd-index-group">
79
+ <h2>Index</h2>
80
+ <section class="tsd-panel tsd-index-panel">
81
+ <div class="tsd-index-content">
82
+ <section class="tsd-index-section ">
83
+ <h3>Properties</h3>
84
+ <ul class="tsd-index-list">
85
+ <li class="tsd-kind-property tsd-parent-kind-interface"><a href="file.genexportbyblobparams.html#axiosrequest" class="tsd-kind-icon">axios<wbr>Request</a></li>
86
+ <li class="tsd-kind-property tsd-parent-kind-interface"><a href="file.genexportbyblobparams.html#notwithcredentials" class="tsd-kind-icon">not<wbr>With<wbr>Credentials</a></li>
87
+ </ul>
88
+ </section>
89
+ </div>
90
+ </section>
91
+ </section>
92
+ <section class="tsd-panel-group tsd-member-group ">
93
+ <h2>Properties</h2>
94
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
95
+ <a name="axiosrequest" class="tsd-anchor"></a>
96
+ <h3>axios<wbr>Request</h3>
97
+ <div class="tsd-signature tsd-kind-icon">axios<wbr>Request<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
98
+ <aside class="tsd-sources">
99
+ <ul>
100
+ <li>Defined in src/file/index.ts:210</li>
101
+ </ul>
102
+ </aside>
103
+ <div class="tsd-comment tsd-typography">
104
+ <div class="lead">
105
+ <p>axios 请求函数</p>
106
+ </div>
107
+ </div>
108
+ </section>
109
+ <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
110
+ <a name="notwithcredentials" class="tsd-anchor"></a>
111
+ <h3><span class="tsd-flag ts-flagOptional">Optional</span> not<wbr>With<wbr>Credentials</h3>
112
+ <div class="tsd-signature tsd-kind-icon">not<wbr>With<wbr>Credentials<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
113
+ <aside class="tsd-sources">
114
+ <ul>
115
+ <li>Defined in src/file/index.ts:214</li>
116
+ </ul>
117
+ </aside>
118
+ <div class="tsd-comment tsd-typography">
119
+ <div class="lead">
120
+ <p>不使用 withCredentials 域名</p>
121
+ </div>
122
+ </div>
123
+ </section>
124
+ </section>
125
+ </div>
126
+ <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
127
+ <nav class="tsd-navigation primary">
128
+ <ul>
129
+ <li class="globals ">
130
+ <a href="../globals.html"><em>Globals</em></a>
131
+ </li>
132
+ <li class=" tsd-kind-module">
133
+ <a href="../modules/common.html">Common</a>
134
+ </li>
135
+ <li class=" tsd-kind-module">
136
+ <a href="../modules/date.html">Date</a>
137
+ </li>
138
+ <li class="current tsd-kind-module">
139
+ <a href="../modules/file.html">File</a>
140
+ </li>
141
+ <li class=" tsd-kind-module">
142
+ <a href="../modules/number.html">Number</a>
143
+ </li>
144
+ <li class=" tsd-kind-module">
145
+ <a href="../modules/object.html">Object</a>
146
+ </li>
147
+ <li class=" tsd-kind-module">
148
+ <a href="../modules/print.html">Print</a>
149
+ </li>
150
+ <li class=" tsd-kind-module">
151
+ <a href="../modules/string.html">String</a>
152
+ </li>
153
+ <li class=" tsd-kind-module">
154
+ <a href="../modules/validate.html">Validate</a>
155
+ </li>
156
+ </ul>
157
+ </nav>
158
+ <nav class="tsd-navigation secondary menu-sticky">
159
+ <ul class="before-current">
160
+ <li class=" tsd-kind-interface tsd-parent-kind-module">
161
+ <a href="file.compressimgqualitycallback.html" class="tsd-kind-icon">Compress<wbr>Img<wbr>Quality<wbr>Callback</a>
162
+ </li>
163
+ <li class=" tsd-kind-interface tsd-parent-kind-module">
164
+ <a href="file.compressimgscalecallback.html" class="tsd-kind-icon">Compress<wbr>Img<wbr>Scale<wbr>Callback</a>
165
+ </li>
166
+ <li class=" tsd-kind-interface tsd-parent-kind-module">
167
+ <a href="file.exportbyblobparams.html" class="tsd-kind-icon">Export<wbr>ByBlob<wbr>Params</a>
168
+ </li>
169
+ <li class=" tsd-kind-interface tsd-parent-kind-module">
170
+ <a href="file.filesizeobject.html" class="tsd-kind-icon">File<wbr>Size<wbr>Object</a>
171
+ </li>
172
+ </ul>
173
+ <ul class="current">
174
+ <li class="current tsd-kind-interface tsd-parent-kind-module">
175
+ <a href="file.genexportbyblobparams.html" class="tsd-kind-icon">Gen<wbr>Export<wbr>ByBlob<wbr>Params</a>
176
+ <ul>
177
+ <li class=" tsd-kind-property tsd-parent-kind-interface">
178
+ <a href="file.genexportbyblobparams.html#axiosrequest" class="tsd-kind-icon">axios<wbr>Request</a>
179
+ </li>
180
+ <li class=" tsd-kind-property tsd-parent-kind-interface">
181
+ <a href="file.genexportbyblobparams.html#notwithcredentials" class="tsd-kind-icon">not<wbr>With<wbr>Credentials</a>
182
+ </li>
183
+ </ul>
184
+ </li>
185
+ </ul>
186
+ <ul class="after-current">
187
+ <li class=" tsd-kind-type-alias tsd-parent-kind-module">
188
+ <a href="../modules/file.html#filesizeunit" class="tsd-kind-icon">File<wbr>Size<wbr>Unit</a>
189
+ </li>
190
+ <li class=" tsd-kind-type-alias tsd-parent-kind-module">
191
+ <a href="../modules/file.html#method" class="tsd-kind-icon">Method</a>
192
+ </li>
193
+ <li class=" tsd-kind-function tsd-parent-kind-module">
194
+ <a href="../modules/file.html#blobtodataurl" class="tsd-kind-icon">blob<wbr>ToDataURL</a>
195
+ </li>
196
+ <li class=" tsd-kind-function tsd-parent-kind-module">
197
+ <a href="../modules/file.html#calcfilesize" class="tsd-kind-icon">calc<wbr>File<wbr>Size</a>
198
+ </li>
199
+ <li class=" tsd-kind-function tsd-parent-kind-module">
200
+ <a href="../modules/file.html#compressimg" class="tsd-kind-icon">compress<wbr>Img</a>
201
+ </li>
202
+ <li class=" tsd-kind-function tsd-parent-kind-module">
203
+ <a href="../modules/file.html#dataurltoblob" class="tsd-kind-icon">dataURLto<wbr>Blob</a>
204
+ </li>
205
+ <li class=" tsd-kind-function tsd-parent-kind-module">
206
+ <a href="../modules/file.html#filesizeformat" class="tsd-kind-icon">file<wbr>Size<wbr>Format</a>
207
+ </li>
208
+ <li class=" tsd-kind-function tsd-parent-kind-module">
209
+ <a href="../modules/file.html#genexportbyblob" class="tsd-kind-icon">gen<wbr>Export<wbr>ByBlob</a>
210
+ </li>
211
+ </ul>
212
+ </nav>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <footer class="with-border-bottom">
217
+ <div class="container">
218
+ <h2>Legend</h2>
219
+ <div class="tsd-legend-group">
220
+ <ul class="tsd-legend">
221
+ <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
222
+ <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
223
+ </ul>
224
+ <ul class="tsd-legend">
225
+ <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
226
+ <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
227
+ </ul>
228
+ </div>
229
+ </div>
230
+ </footer>
231
+ <div class="container tsd-generator">
232
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
233
+ </div>
234
+ <div class="overlay"></div>
235
+ <script src="../assets/js/main.js"></script>
236
+ </body>
237
+ </html>
@@ -0,0 +1,188 @@
1
+ <!doctype html>
2
+ <html class="default no-js">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <title>Common | fe-utils</title>
7
+ <meta name="description" content="Documentation for fe-utils">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+ <link rel="stylesheet" href="../assets/css/main.css">
10
+ </head>
11
+ <body>
12
+ <header>
13
+ <div class="tsd-page-toolbar">
14
+ <div class="container">
15
+ <div class="table-wrap">
16
+ <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
17
+ <div class="field">
18
+ <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
19
+ <input id="tsd-search-field" type="text" />
20
+ </div>
21
+ <ul class="results">
22
+ <li class="state loading">Preparing search index...</li>
23
+ <li class="state failure">The search index is not available</li>
24
+ </ul>
25
+ <a href="../index.html" class="title">fe-utils</a>
26
+ </div>
27
+ <div class="table-cell" id="tsd-widgets">
28
+ <div id="tsd-filter">
29
+ <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
30
+ <div class="tsd-filter-group">
31
+ <div class="tsd-select" id="tsd-filter-visibility">
32
+ <span class="tsd-select-label">All</span>
33
+ <ul class="tsd-select-list">
34
+ <li data-value="public">Public</li>
35
+ <li data-value="protected">Public/Protected</li>
36
+ <li data-value="private" class="selected">All</li>
37
+ </ul>
38
+ </div>
39
+ <input type="checkbox" id="tsd-filter-inherited" checked />
40
+ <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
41
+ <input type="checkbox" id="tsd-filter-externals" checked />
42
+ <label class="tsd-widget" for="tsd-filter-externals">Externals</label>
43
+ </div>
44
+ </div>
45
+ <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div class="tsd-page-title">
51
+ <div class="container">
52
+ <ul class="tsd-breadcrumb">
53
+ <li>
54
+ <a href="../globals.html">Globals</a>
55
+ </li>
56
+ <li>
57
+ <a href="common.html">Common</a>
58
+ </li>
59
+ </ul>
60
+ <h1>Module Common</h1>
61
+ </div>
62
+ </div>
63
+ </header>
64
+ <div class="container container-main">
65
+ <div class="row">
66
+ <div class="col-8 col-content">
67
+ <section class="tsd-panel tsd-comment">
68
+ <div class="tsd-comment tsd-typography">
69
+ <div class="lead">
70
+ <p>通用函数</p>
71
+ </div>
72
+ </div>
73
+ </section>
74
+ <section class="tsd-panel-group tsd-index-group">
75
+ <h2>Index</h2>
76
+ <section class="tsd-panel tsd-index-panel">
77
+ <div class="tsd-index-content">
78
+ <section class="tsd-index-section ">
79
+ <h3>Functions</h3>
80
+ <ul class="tsd-index-list">
81
+ <li class="tsd-kind-function tsd-parent-kind-module"><a href="common.html#isempty" class="tsd-kind-icon">is<wbr>Empty</a></li>
82
+ </ul>
83
+ </section>
84
+ </div>
85
+ </section>
86
+ </section>
87
+ <section class="tsd-panel-group tsd-member-group ">
88
+ <h2>Functions</h2>
89
+ <section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
90
+ <a name="isempty" class="tsd-anchor"></a>
91
+ <h3>is<wbr>Empty</h3>
92
+ <ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
93
+ <li class="tsd-signature tsd-kind-icon">is<wbr>Empty<span class="tsd-signature-symbol">(</span>val<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
94
+ </ul>
95
+ <ul class="tsd-descriptions">
96
+ <li class="tsd-description">
97
+ <aside class="tsd-sources">
98
+ <ul>
99
+ <li>Defined in src/common/index.ts:18</li>
100
+ </ul>
101
+ </aside>
102
+ <div class="tsd-comment tsd-typography">
103
+ <div class="lead">
104
+ <p>判断val 是否是空值</p>
105
+ <a href="#使用说明" id="使用说明" style="color: inherit; text-decoration: none;">
106
+ <h4>使用说明</h4>
107
+ </a>
108
+ <pre><code><span class="hljs-function"><span class="hljs-title">isEmpty</span><span class="hljs-params">(<span class="hljs-string">&#x27;&#x27;</span>)</span></span> 返回 true
109
+ <span class="hljs-function"><span class="hljs-title">isEmpty</span><span class="hljs-params">(null)</span></span> 返回 true
110
+ <span class="hljs-function"><span class="hljs-title">isEmpty</span><span class="hljs-params">(undefined)</span></span> 返回 true
111
+ <span class="hljs-function"><span class="hljs-title">isEmpty</span><span class="hljs-params">(<span class="hljs-number">12323</span>)</span></span> 返回 false</code></pre>
112
+ </div>
113
+ </div>
114
+ <h4 class="tsd-parameters-title">Parameters</h4>
115
+ <ul class="tsd-parameters">
116
+ <li>
117
+ <h5>val: <span class="tsd-signature-type">any</span></h5>
118
+ </li>
119
+ </ul>
120
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
121
+ </li>
122
+ </ul>
123
+ </section>
124
+ </section>
125
+ </div>
126
+ <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
127
+ <nav class="tsd-navigation primary">
128
+ <ul>
129
+ <li class="globals ">
130
+ <a href="../globals.html"><em>Globals</em></a>
131
+ </li>
132
+ <li class="current tsd-kind-module">
133
+ <a href="common.html">Common</a>
134
+ </li>
135
+ <li class=" tsd-kind-module">
136
+ <a href="date.html">Date</a>
137
+ </li>
138
+ <li class=" tsd-kind-module">
139
+ <a href="file.html">File</a>
140
+ </li>
141
+ <li class=" tsd-kind-module">
142
+ <a href="number.html">Number</a>
143
+ </li>
144
+ <li class=" tsd-kind-module">
145
+ <a href="object.html">Object</a>
146
+ </li>
147
+ <li class=" tsd-kind-module">
148
+ <a href="print.html">Print</a>
149
+ </li>
150
+ <li class=" tsd-kind-module">
151
+ <a href="string.html">String</a>
152
+ </li>
153
+ <li class=" tsd-kind-module">
154
+ <a href="validate.html">Validate</a>
155
+ </li>
156
+ </ul>
157
+ </nav>
158
+ <nav class="tsd-navigation secondary menu-sticky">
159
+ <ul class="before-current">
160
+ <li class=" tsd-kind-function tsd-parent-kind-module">
161
+ <a href="common.html#isempty" class="tsd-kind-icon">is<wbr>Empty</a>
162
+ </li>
163
+ </ul>
164
+ </nav>
165
+ </div>
166
+ </div>
167
+ </div>
168
+ <footer class="with-border-bottom">
169
+ <div class="container">
170
+ <h2>Legend</h2>
171
+ <div class="tsd-legend-group">
172
+ <ul class="tsd-legend">
173
+ <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
174
+ <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
175
+ </ul>
176
+ <ul class="tsd-legend">
177
+ <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
178
+ </ul>
179
+ </div>
180
+ </div>
181
+ </footer>
182
+ <div class="container tsd-generator">
183
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
184
+ </div>
185
+ <div class="overlay"></div>
186
+ <script src="../assets/js/main.js"></script>
187
+ </body>
188
+ </html>