w-dwdata-tweq 1.0.13 → 1.0.15
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/README.md +2 -2
- package/_taskCpActualSrc/fpHash.json +1 -0
- package/dist/w-dwdata-tweq.umd.js +2 -2
- package/dist/w-dwdata-tweq.umd.js.map +1 -1
- package/docs/WDwdataTweq.mjs.html +14 -3
- package/docs/global.html +43 -3
- package/docs/index.html +1 -1
- package/g.mjs +2 -2
- package/package.json +2 -2
- package/src/WDwdataTweq.mjs +13 -2
- package/test/WDwdataTweq.test.mjs +2 -2
|
@@ -51,7 +51,9 @@ import each from 'lodash-es/each.js'
|
|
|
51
51
|
import reverse from 'lodash-es/reverse.js'
|
|
52
52
|
import isestr from 'wsemi/src/isestr.mjs'
|
|
53
53
|
import isnum from 'wsemi/src/isnum.mjs'
|
|
54
|
+
import isp0int from 'wsemi/src/isp0int.mjs'
|
|
54
55
|
import isfun from 'wsemi/src/isfun.mjs'
|
|
56
|
+
import cdbl from 'wsemi/src/cdbl.mjs'
|
|
55
57
|
import cint from 'wsemi/src/cint.mjs'
|
|
56
58
|
import fsIsFolder from 'wsemi/src/fsIsFolder.mjs'
|
|
57
59
|
import fsCleanFolder from 'wsemi/src/fsCleanFolder.mjs'
|
|
@@ -82,6 +84,7 @@ import cropPic from './cropPic.mjs'
|
|
|
82
84
|
* @param {Function} [opt.funAdd=null] 輸入當有新資料時,需要連動處理之函數,預設null
|
|
83
85
|
* @param {Function} [opt.funModify=null] 輸入當有資料需更新時,需要連動處理之函數,預設null
|
|
84
86
|
* @param {Function} [opt.funRemove=null] 輸入當有資料需刪除時,需要連動處理之函數,預設null
|
|
87
|
+
* @param {Number} [opt.timeToleranceRemove=0] 輸入刪除任務之防抖時長,單位ms,預設0,代表不使用
|
|
85
88
|
* @returns {Object} 回傳事件物件,可呼叫函數on監聽change事件
|
|
86
89
|
* @example
|
|
87
90
|
*
|
|
@@ -100,9 +103,9 @@ import cropPic from './cropPic.mjs'
|
|
|
100
103
|
* })
|
|
101
104
|
* // change { event: 'start', msg: 'running...' }
|
|
102
105
|
* // change { event: 'proc-callfun-download', msg: 'start...' }
|
|
103
|
-
* // change { event: 'proc-callfun-download', msg: 'done' }
|
|
106
|
+
* // change { event: 'proc-callfun-download', num: 2, msg: 'done' }
|
|
104
107
|
* // change { event: 'proc-callfun-getCurrent', msg: 'start...' }
|
|
105
|
-
* // change { event: 'proc-callfun-getCurrent', msg: 'done' }
|
|
108
|
+
* // change { event: 'proc-callfun-getCurrent', num: 0, msg: 'done' }
|
|
106
109
|
* // change { event: 'compare', msg: 'start...' }
|
|
107
110
|
* // change { event: 'compare', msg: 'done' }
|
|
108
111
|
* // change { event: 'proc-add-callfun-add', id: '111001', msg: 'start...' }
|
|
@@ -192,6 +195,13 @@ let WDwdataTweq = async(yearStart, yearEnd, opt = {}) => {
|
|
|
192
195
|
//funRemove
|
|
193
196
|
let funRemove = get(opt, 'funRemove')
|
|
194
197
|
|
|
198
|
+
//timeToleranceRemove
|
|
199
|
+
let timeToleranceRemove = get(opt, 'timeToleranceRemove')
|
|
200
|
+
if (!isp0int(timeToleranceRemove)) {
|
|
201
|
+
timeToleranceRemove = 0
|
|
202
|
+
}
|
|
203
|
+
timeToleranceRemove = cdbl(timeToleranceRemove)
|
|
204
|
+
|
|
195
205
|
//funDownloadDef
|
|
196
206
|
let funDownloadDef = async() => {
|
|
197
207
|
|
|
@@ -307,6 +317,7 @@ let WDwdataTweq = async(yearStart, yearEnd, opt = {}) => {
|
|
|
307
317
|
funRemove,
|
|
308
318
|
funAdd,
|
|
309
319
|
funModify,
|
|
320
|
+
timeToleranceRemove,
|
|
310
321
|
}
|
|
311
322
|
let ev = await WDwdataBuilder(optBdr)
|
|
312
323
|
|
|
@@ -329,7 +340,7 @@ export default WDwdataTweq
|
|
|
329
340
|
<br class="clear">
|
|
330
341
|
|
|
331
342
|
<footer>
|
|
332
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Mon Sep 01 2025
|
|
343
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Mon Sep 01 2025 12:40:51 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
333
344
|
</footer>
|
|
334
345
|
|
|
335
346
|
<script>prettyPrint();</script>
|
package/docs/global.html
CHANGED
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
|
|
147
147
|
<dt class="tag-source">Source:</dt>
|
|
148
148
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
149
|
-
<a href="WDwdataTweq.mjs.html">WDwdataTweq.mjs</a>, <a href="WDwdataTweq.mjs.html#
|
|
149
|
+
<a href="WDwdataTweq.mjs.html">WDwdataTweq.mjs</a>, <a href="WDwdataTweq.mjs.html#line71">line 71</a>
|
|
150
150
|
</li></ul></dd>
|
|
151
151
|
|
|
152
152
|
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
|
|
194
194
|
<h5 class="h5-examples">Example</h5>
|
|
195
195
|
|
|
196
|
-
<pre class="prettyprint"><code>import WDwdataTweq from './src/WDwdataTweq.mjs'
|
|
197
196
|
.catch((err) => {
|
|
198
197
|
console.log(err)
|
|
199
198
|
})
|
|
200
199
|
delete msg.type
|
|
201
200
|
console.log('change', msg)
|
|
201
|
+
<pre class="prettyprint"><code>import WDwdataTweq from './src/WDwdataTweq.mjs'
|
|
202
202
|
.catch((err) => {
|
|
203
203
|
console.log(err)
|
|
204
204
|
})
|
|
205
205
|
delete msg.type
|
|
206
206
|
console.log('change', msg)
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
|
|
@@ -799,6 +799,46 @@
|
|
|
799
799
|
</tr>
|
|
800
800
|
|
|
801
801
|
|
|
802
|
+
|
|
803
|
+
<tr>
|
|
804
|
+
|
|
805
|
+
<td class="name"><code>timeToleranceRemove</code></td>
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
<td class="type">
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
<span class="param-type">Number</span>
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
</td>
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
<td class="attributes">
|
|
820
|
+
|
|
821
|
+
<optional><br>
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
</td>
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
<td class="default">
|
|
832
|
+
|
|
833
|
+
<code>0</code>
|
|
834
|
+
|
|
835
|
+
</td>
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
<td class="description last"><p>輸入刪除任務之防抖時長,單位ms,預設0,代表不使用</p></td>
|
|
839
|
+
</tr>
|
|
840
|
+
|
|
841
|
+
|
|
802
842
|
</tbody>
|
|
803
843
|
</table>
|
|
804
844
|
|
|
@@ -870,7 +910,7 @@
|
|
|
870
910
|
<br class="clear">
|
|
871
911
|
|
|
872
912
|
<footer>
|
|
873
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Mon Sep 01 2025
|
|
913
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Mon Sep 01 2025 12:40:51 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
874
914
|
</footer>
|
|
875
915
|
|
|
876
916
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<br class="clear">
|
|
72
72
|
|
|
73
73
|
<footer>
|
|
74
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Mon Sep 01 2025
|
|
74
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Mon Sep 01 2025 12:40:51 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
75
75
|
</footer>
|
|
76
76
|
|
|
77
77
|
<script>prettyPrint();</script>
|
package/g.mjs
CHANGED
|
@@ -39,9 +39,9 @@ ev.on('change', (msg) => {
|
|
|
39
39
|
})
|
|
40
40
|
// change { event: 'start', msg: 'running...' }
|
|
41
41
|
// change { event: 'proc-callfun-download', msg: 'start...' }
|
|
42
|
-
// change { event: 'proc-callfun-download', msg: 'done' }
|
|
42
|
+
// change { event: 'proc-callfun-download', num: 2, msg: 'done' }
|
|
43
43
|
// change { event: 'proc-callfun-getCurrent', msg: 'start...' }
|
|
44
|
-
// change { event: 'proc-callfun-getCurrent', msg: 'done' }
|
|
44
|
+
// change { event: 'proc-callfun-getCurrent', num: 0, msg: 'done' }
|
|
45
45
|
// change { event: 'compare', msg: 'start...' }
|
|
46
46
|
// change { event: 'compare', msg: 'done' }
|
|
47
47
|
// change { event: 'proc-add-callfun-add', id: '111001', msg: 'start...' }
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w-dwdata-tweq",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"main": "dist/w-dwdata-tweq.umd.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"axios": "^1.11.0",
|
|
7
7
|
"lodash-es": "^4.17.21",
|
|
8
8
|
"sharp": "^0.34.3",
|
|
9
|
-
"w-dwdata-builder": "^1.0.
|
|
9
|
+
"w-dwdata-builder": "^1.0.18",
|
|
10
10
|
"wsemi": "^1.8.20"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
package/src/WDwdataTweq.mjs
CHANGED
|
@@ -4,7 +4,9 @@ import each from 'lodash-es/each.js'
|
|
|
4
4
|
import reverse from 'lodash-es/reverse.js'
|
|
5
5
|
import isestr from 'wsemi/src/isestr.mjs'
|
|
6
6
|
import isnum from 'wsemi/src/isnum.mjs'
|
|
7
|
+
import isp0int from 'wsemi/src/isp0int.mjs'
|
|
7
8
|
import isfun from 'wsemi/src/isfun.mjs'
|
|
9
|
+
import cdbl from 'wsemi/src/cdbl.mjs'
|
|
8
10
|
import cint from 'wsemi/src/cint.mjs'
|
|
9
11
|
import fsIsFolder from 'wsemi/src/fsIsFolder.mjs'
|
|
10
12
|
import fsCleanFolder from 'wsemi/src/fsCleanFolder.mjs'
|
|
@@ -35,6 +37,7 @@ import cropPic from './cropPic.mjs'
|
|
|
35
37
|
* @param {Function} [opt.funAdd=null] 輸入當有新資料時,需要連動處理之函數,預設null
|
|
36
38
|
* @param {Function} [opt.funModify=null] 輸入當有資料需更新時,需要連動處理之函數,預設null
|
|
37
39
|
* @param {Function} [opt.funRemove=null] 輸入當有資料需刪除時,需要連動處理之函數,預設null
|
|
40
|
+
* @param {Number} [opt.timeToleranceRemove=0] 輸入刪除任務之防抖時長,單位ms,預設0,代表不使用
|
|
38
41
|
* @returns {Object} 回傳事件物件,可呼叫函數on監聽change事件
|
|
39
42
|
* @example
|
|
40
43
|
*
|
|
@@ -53,9 +56,9 @@ import cropPic from './cropPic.mjs'
|
|
|
53
56
|
* })
|
|
54
57
|
* // change { event: 'start', msg: 'running...' }
|
|
55
58
|
* // change { event: 'proc-callfun-download', msg: 'start...' }
|
|
56
|
-
* // change { event: 'proc-callfun-download', msg: 'done' }
|
|
59
|
+
* // change { event: 'proc-callfun-download', num: 2, msg: 'done' }
|
|
57
60
|
* // change { event: 'proc-callfun-getCurrent', msg: 'start...' }
|
|
58
|
-
* // change { event: 'proc-callfun-getCurrent', msg: 'done' }
|
|
61
|
+
* // change { event: 'proc-callfun-getCurrent', num: 0, msg: 'done' }
|
|
59
62
|
* // change { event: 'compare', msg: 'start...' }
|
|
60
63
|
* // change { event: 'compare', msg: 'done' }
|
|
61
64
|
* // change { event: 'proc-add-callfun-add', id: '111001', msg: 'start...' }
|
|
@@ -145,6 +148,13 @@ let WDwdataTweq = async(yearStart, yearEnd, opt = {}) => {
|
|
|
145
148
|
//funRemove
|
|
146
149
|
let funRemove = get(opt, 'funRemove')
|
|
147
150
|
|
|
151
|
+
//timeToleranceRemove
|
|
152
|
+
let timeToleranceRemove = get(opt, 'timeToleranceRemove')
|
|
153
|
+
if (!isp0int(timeToleranceRemove)) {
|
|
154
|
+
timeToleranceRemove = 0
|
|
155
|
+
}
|
|
156
|
+
timeToleranceRemove = cdbl(timeToleranceRemove)
|
|
157
|
+
|
|
148
158
|
//funDownloadDef
|
|
149
159
|
let funDownloadDef = async() => {
|
|
150
160
|
|
|
@@ -260,6 +270,7 @@ let WDwdataTweq = async(yearStart, yearEnd, opt = {}) => {
|
|
|
260
270
|
funRemove,
|
|
261
271
|
funAdd,
|
|
262
272
|
funModify,
|
|
273
|
+
timeToleranceRemove,
|
|
263
274
|
}
|
|
264
275
|
let ev = await WDwdataBuilder(optBdr)
|
|
265
276
|
|
|
@@ -129,9 +129,9 @@ describe('WDwdataTweq', function() {
|
|
|
129
129
|
let ms = [
|
|
130
130
|
{ event: 'start', msg: 'running...' },
|
|
131
131
|
{ event: 'proc-callfun-download', msg: 'start...' },
|
|
132
|
-
{ event: 'proc-callfun-download', msg: 'done' },
|
|
132
|
+
{ event: 'proc-callfun-download', num: 2, msg: 'done' },
|
|
133
133
|
{ event: 'proc-callfun-getCurrent', msg: 'start...' },
|
|
134
|
-
{ event: 'proc-callfun-getCurrent', msg: 'done' },
|
|
134
|
+
{ event: 'proc-callfun-getCurrent', num: 0, msg: 'done' },
|
|
135
135
|
{ event: 'compare', msg: 'start...' },
|
|
136
136
|
{ event: 'compare', msg: 'done' },
|
|
137
137
|
{ event: 'proc-add-callfun-add', id: '114115', msg: 'start...' },
|