amos-tool 1.5.0 → 1.5.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.
- package/docs/Logger.html +1 -1
- package/docs/global.html +14 -2
- package/docs/index.html +1 -1
- package/index.d.ts +9 -0
- package/lib/store.js +31 -5
- package/package.json +1 -1
package/docs/Logger.html
CHANGED
|
@@ -334,7 +334,7 @@ isDebug: true
|
|
|
334
334
|
<br class="clear">
|
|
335
335
|
|
|
336
336
|
<footer>
|
|
337
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on
|
|
337
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 11 2022 10:15:14 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
338
338
|
</footer>
|
|
339
339
|
|
|
340
340
|
<script>prettyPrint();</script>
|
package/docs/global.html
CHANGED
|
@@ -3003,7 +3003,7 @@ as error objects, functions, DOM nodes, and WeakMaps.</p>
|
|
|
3003
3003
|
|
|
3004
3004
|
|
|
3005
3005
|
|
|
3006
|
-
<h4 class="name" id="completeUnit"><span class="type-signature"></span>completeUnit<span class="signature">(val, tag)</span><span class="type-signature"
|
|
3006
|
+
<h4 class="name" id="completeUnit"><span class="type-signature"></span>completeUnit<span class="signature">(val, tag)</span><span class="type-signature"> → {String}</span></h4>
|
|
3007
3007
|
|
|
3008
3008
|
|
|
3009
3009
|
|
|
@@ -3157,6 +3157,18 @@ as error objects, functions, DOM nodes, and WeakMaps.</p>
|
|
|
3157
3157
|
|
|
3158
3158
|
|
|
3159
3159
|
|
|
3160
|
+
<dl class="param-type">
|
|
3161
|
+
<dt>
|
|
3162
|
+
Type
|
|
3163
|
+
</dt>
|
|
3164
|
+
<dd>
|
|
3165
|
+
|
|
3166
|
+
<span class="param-type">String</span>
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
</dd>
|
|
3170
|
+
</dl>
|
|
3171
|
+
|
|
3160
3172
|
|
|
3161
3173
|
|
|
3162
3174
|
|
|
@@ -15870,7 +15882,7 @@ schedule <code>callback</code> to execute after <code>delay</code> ms.</p></td>
|
|
|
15870
15882
|
<br class="clear">
|
|
15871
15883
|
|
|
15872
15884
|
<footer>
|
|
15873
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on
|
|
15885
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 11 2022 10:15:14 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
15874
15886
|
</footer>
|
|
15875
15887
|
|
|
15876
15888
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -783,7 +783,7 @@ convert2BMP(canvas, width, height)</p>
|
|
|
783
783
|
<br class="clear">
|
|
784
784
|
|
|
785
785
|
<footer>
|
|
786
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on
|
|
786
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Fri Nov 11 2022 10:15:14 GMT+0800 (GMT+08:00) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
787
787
|
</footer>
|
|
788
788
|
|
|
789
789
|
<script>prettyPrint();</script>
|
package/index.d.ts
CHANGED
|
@@ -319,6 +319,8 @@ declare namespace Store {
|
|
|
319
319
|
export function write(key: string, data: string): any;
|
|
320
320
|
export function each(fn: (value: string, key: string) => {}): void;
|
|
321
321
|
export function remove(key: string): void;
|
|
322
|
+
export function fuzzyRemove(fn: (key: String) => Boolean): void;
|
|
323
|
+
export function allKeys(): String[];
|
|
322
324
|
export function clearAll(): void;
|
|
323
325
|
}
|
|
324
326
|
/**
|
|
@@ -330,6 +332,8 @@ declare namespace Store {
|
|
|
330
332
|
export function write(key: string, data: string): any;
|
|
331
333
|
export function each(fn: (value: string, key: string) => {}): void;
|
|
332
334
|
export function remove(key: string): void;
|
|
335
|
+
export function fuzzyRemove(fn: (key: String) => Boolean): void;
|
|
336
|
+
export function allKeys(): String[];
|
|
333
337
|
export function clearAll(): void;
|
|
334
338
|
}
|
|
335
339
|
}
|
|
@@ -1007,6 +1011,11 @@ declare namespace utils {
|
|
|
1007
1011
|
* @param obj
|
|
1008
1012
|
*/
|
|
1009
1013
|
export function isOwnKeyInObject(keys: string | string[], obj: any): boolean;
|
|
1014
|
+
/**
|
|
1015
|
+
* 判断是否是 promise
|
|
1016
|
+
* @param value
|
|
1017
|
+
*/
|
|
1018
|
+
export function isPromise(value: any): boolean;
|
|
1010
1019
|
export function simpleEqual(objA: object, objB: object): boolean;
|
|
1011
1020
|
/**
|
|
1012
1021
|
* 判断是一个 image 的路径
|
package/lib/store.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _Base64 = require("./encrypt/_base64"), trim = require("./_trim"),
|
|
4
|
-
localStorage:
|
|
3
|
+
var _Base64 = require("./encrypt/_base64"), trim = require("./_trim"), _Global = "undefined" != typeof window ? window : global, doc = _Global.document, _localStorage = {
|
|
4
|
+
localStorage: _Global.localStorage,
|
|
5
5
|
read: function(e) {
|
|
6
6
|
return _localStorage.localStorage.getItem(e);
|
|
7
7
|
},
|
|
@@ -17,11 +17,24 @@ var _Base64 = require("./encrypt/_base64"), trim = require("./_trim"), Global =
|
|
|
17
17
|
remove: function(e) {
|
|
18
18
|
return _localStorage.localStorage.removeItem(e);
|
|
19
19
|
},
|
|
20
|
+
fuzzyRemove: function(e) {
|
|
21
|
+
for (var o = _localStorage.localStorage.length - 1; o >= 0; o--) {
|
|
22
|
+
var r = _localStorage.localStorage.key(o);
|
|
23
|
+
e(r) && _localStorage.remove(r);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
allKeys: function() {
|
|
27
|
+
for (var e = [], o = _localStorage.localStorage.length - 1; o >= 0; o--) {
|
|
28
|
+
var r = _localStorage.localStorage.key(o);
|
|
29
|
+
e.push(r);
|
|
30
|
+
}
|
|
31
|
+
return e;
|
|
32
|
+
},
|
|
20
33
|
clearAll: function() {
|
|
21
34
|
return _localStorage.localStorage.clear();
|
|
22
35
|
}
|
|
23
36
|
}, _sessionStorage = {
|
|
24
|
-
sessionStorage:
|
|
37
|
+
sessionStorage: _Global.sessionStorage,
|
|
25
38
|
read: function(e) {
|
|
26
39
|
return _sessionStorage.sessionStorage.getItem(e);
|
|
27
40
|
},
|
|
@@ -37,6 +50,19 @@ var _Base64 = require("./encrypt/_base64"), trim = require("./_trim"), Global =
|
|
|
37
50
|
remove: function(e) {
|
|
38
51
|
return _sessionStorage.sessionStorage.removeItem(e);
|
|
39
52
|
},
|
|
53
|
+
fuzzyRemove: function(e) {
|
|
54
|
+
for (var o = _sessionStorage.sessionStorage.length - 1; o >= 0; o--) {
|
|
55
|
+
var r = _sessionStorage.sessionStorage.key(o);
|
|
56
|
+
e(r) && _sessionStorage.remove(r);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
allKeys: function() {
|
|
60
|
+
for (var e = [], o = _sessionStorage.sessionStorage.length - 1; o >= 0; o--) {
|
|
61
|
+
var r = _sessionStorage.sessionStorage.key(o);
|
|
62
|
+
e.push(r);
|
|
63
|
+
}
|
|
64
|
+
return e;
|
|
65
|
+
},
|
|
40
66
|
clearAll: function() {
|
|
41
67
|
return _sessionStorage.sessionStorage.clear();
|
|
42
68
|
}
|
|
@@ -61,8 +87,8 @@ var _Base64 = require("./encrypt/_base64"), trim = require("./_trim"), Global =
|
|
|
61
87
|
var e = {}, o = doc.cookie;
|
|
62
88
|
if ("" === o) return e;
|
|
63
89
|
for (var r = o.split("; "), t = 0; t < r.length; t++) {
|
|
64
|
-
var a = r[t], n = a.indexOf("="), s = a.substring(0, n),
|
|
65
|
-
|
|
90
|
+
var a = r[t], n = a.indexOf("="), s = a.substring(0, n), l = a.substring(n + 1);
|
|
91
|
+
l = JSON.parse(unescape(l)), e[s] = l;
|
|
66
92
|
}
|
|
67
93
|
return e;
|
|
68
94
|
},
|