amos-tool 1.4.7 → 1.4.8
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/.prettierignore +2 -2
- package/.prettierrc +50 -50
- package/README.md +667 -667
- package/apis/objectPath.md +129 -129
- package/index.d.ts +11 -2
- package/index.js +3 -3
- package/lib/_browser.js +10 -8
- package/lib/_clone.js +68 -57
- package/lib/_cookie.js +50 -47
- package/lib/_deepCopy.js +14 -19
- package/lib/_deepEqual.js +7 -8
- package/lib/_fastDeepEqual.js +26 -34
- package/lib/_flashSupport.js +13 -10
- package/lib/_forOwn.js +8 -7
- package/lib/_funcThrottle.js +16 -15
- package/lib/_isnode.js +2 -1
- package/lib/_list.js +74 -79
- package/lib/_object.assign.js +19 -19
- package/lib/_object.entries.js +8 -7
- package/lib/_object.values.js +8 -7
- package/lib/_omit.js +12 -11
- package/lib/_parseJson.js +7 -6
- package/lib/_pick.js +8 -7
- package/lib/_queue.js +24 -21
- package/lib/_shallowCopy.js +24 -23
- package/lib/_stringify.js +13 -10
- package/lib/_supportWs.js +5 -5
- package/lib/_trim.js +5 -4
- package/lib/_typeOfList.js +22 -21
- package/lib/_uuids.js +30 -35
- package/lib/amostool.js +4 -66
- package/lib/array2tree.js +9 -9
- package/lib/arrayFilter.js +18 -19
- package/lib/arrayUtils.js +10 -8
- package/lib/browser/Cookie.js +35 -36
- package/lib/browser/indexDB.js +72 -71
- package/lib/browserSupport.js +76 -71
- package/lib/completeUnit.js +7 -4
- package/lib/consts.js +2 -1
- package/lib/dom/canvas2img.js +61 -72
- package/lib/dom/canvasTools.js +11 -16
- package/lib/dom/downloadFile.js +17 -12
- package/lib/dom/eventHelper.js +8 -6
- package/lib/dom/fileBlob.js +14 -14
- package/lib/dom/fileSaveAs.js +54 -61
- package/lib/dom/getFontSize.js +7 -10
- package/lib/dom/minfyImg.js +27 -24
- package/lib/encrypt/_base64.js +32 -25
- package/lib/encrypt/_md5.js +68 -31
- package/lib/encrypt/des.js +430 -366
- package/lib/extra/_common.js +120 -161
- package/lib/extra/filterNull.js +5 -4
- package/lib/extra/find.js +10 -11
- package/lib/extra/index.js +4 -3
- package/lib/extra/memo.js +18 -0
- package/lib/extra/pathToTree.js +49 -36
- package/lib/extra/pwdStrength.js +4 -2
- package/lib/extra/sortBy.js +28 -30
- package/lib/flat.js +9 -13
- package/lib/locationParams.js +93 -95
- package/lib/log.js +20 -26
- package/lib/math/_keyColor.js +3 -1
- package/lib/math/addition.js +9 -7
- package/lib/math/amountCase.js +8 -12
- package/lib/math/coinFormat.js +6 -4
- package/lib/math/colorUtil.js +91 -94
- package/lib/math/dateTime.js +79 -97
- package/lib/math/operations.js +33 -37
- package/lib/math/pwdStrength.js +4 -2
- package/lib/math/randomColor.js +17 -5
- package/lib/math/subtraction.js +10 -9
- package/lib/merged.js +9 -9
- package/lib/objectPath.js +81 -82
- package/lib/parseText.js +8 -7
- package/lib/png/Identicon.js +32 -28
- package/lib/png/pnglib.js +59 -34
- package/lib/png/randomPic.js +8 -14
- package/lib/positionFactory.js +28 -28
- package/lib/pwdPolicy.js +27 -31
- package/lib/qs/_assign.js +7 -5
- package/lib/qs/_merge.js +20 -23
- package/lib/qs/_tools.js +3 -2
- package/lib/qs/formats.js +6 -5
- package/lib/qs/index.js +4 -4
- package/lib/qs/parse.js +56 -51
- package/lib/qs/stringify.js +54 -69
- package/lib/qs/utils.js +70 -83
- package/lib/random.js +5 -4
- package/lib/shallowEqual.js +25 -29
- package/lib/store.js +93 -95
- package/lib/strUtils.js +52 -43
- package/lib/tableFilter.js +178 -169
- package/lib/throttleDebounce.js +18 -22
- package/lib/url/encodeUrl.js +5 -4
- package/lib/url/restfulUrl.js +8 -7
- package/lib/utils.js +171 -222
- package/lib/xss/htmlEncode.js +3 -2
- package/lib/xss/implementEncode.js +36 -37
- package/lib/xss/index.js +4 -3
- package/package.json +4 -4
- package/docs/Logger.html +0 -189
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/global.html +0 -14535
- package/docs/index.html +0 -791
- package/docs/scripts/collapse.js +0 -20
- package/docs/scripts/linenumber.js +0 -25
- package/docs/scripts/nav.js +0 -12
- package/docs/scripts/polyfill.js +0 -4
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/scripts/prettify/lang-css.js +0 -2
- package/docs/scripts/prettify/prettify.js +0 -28
- package/docs/scripts/search.js +0 -83
- package/docs/styles/jsdoc.css +0 -765
- package/docs/styles/prettify.css +0 -79
package/lib/_fastDeepEqual.js
CHANGED
|
@@ -1,40 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
isObj = function(e) {
|
|
11
|
-
return "object" === (0, _typeof2.default)(e)
|
|
12
|
-
};
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"), _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")), isArray = Array.isArray, keyList = Object.keys, hasProp = Object.prototype.hasOwnProperty, isFn = function(e) {
|
|
4
|
+
return "function" == typeof e;
|
|
5
|
+
}, isObj = function(e) {
|
|
6
|
+
return "object" === (0, _typeof2.default)(e);
|
|
7
|
+
};
|
|
8
|
+
|
|
13
9
|
module.exports = function e(r, t) {
|
|
14
10
|
if (r === t) return !0;
|
|
15
11
|
if (r && t && isObj(r) && isObj(t)) {
|
|
16
|
-
var i, n, u = isArray(r),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (!e(r[i], t[i])) return !1;
|
|
22
|
-
return !0
|
|
12
|
+
var i, n, u, f = isArray(r), a = isArray(t);
|
|
13
|
+
if (f && a) {
|
|
14
|
+
if ((n = r.length) != t.length) return !1;
|
|
15
|
+
for (i = n; 0 != i--; ) if (!e(r[i], t[i])) return !1;
|
|
16
|
+
return !0;
|
|
23
17
|
}
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
if (
|
|
30
|
-
if (
|
|
31
|
-
var
|
|
32
|
-
if ((
|
|
33
|
-
for (i =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!e(r[n = a[i]], t[n])) return !1;
|
|
37
|
-
return !0
|
|
18
|
+
if (f != a) return !1;
|
|
19
|
+
var o = r instanceof Date, s = t instanceof Date;
|
|
20
|
+
if (o != s) return !1;
|
|
21
|
+
if (o && s) return r.getTime() == t.getTime();
|
|
22
|
+
var p = r instanceof RegExp, l = t instanceof RegExp;
|
|
23
|
+
if (p != l) return !1;
|
|
24
|
+
if (p && l) return r.toString() == t.toString();
|
|
25
|
+
var y = keyList(r);
|
|
26
|
+
if ((n = y.length) !== keyList(t).length) return !1;
|
|
27
|
+
for (i = n; 0 != i--; ) if (!hasProp.call(t, y[i])) return !1;
|
|
28
|
+
for (i = n; 0 != i--; ) if (!e(r[u = y[i]], t[u])) return !1;
|
|
29
|
+
return !0;
|
|
38
30
|
}
|
|
39
|
-
return r && t && isFn(r) && isFn(t) ? r.name === t.name : r != r && t != t
|
|
40
|
-
};
|
|
31
|
+
return r && t && isFn(r) && isFn(t) ? r.name === t.name : r != r && t != t;
|
|
32
|
+
};
|
package/lib/_flashSupport.js
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function checkFlash() {
|
|
4
|
-
var
|
|
5
|
-
t = 0,
|
|
6
|
-
n = null;
|
|
4
|
+
var a = 0, e = 0, t = null;
|
|
7
5
|
if (document.all || document.getElementsByTagName("*")) {
|
|
8
6
|
try {
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
if (t = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) {
|
|
8
|
+
a = 1;
|
|
9
|
+
var n = t.GetVariable("$version");
|
|
10
|
+
e = parseInt(n.split(" ")[0].split(",")[0]);
|
|
11
|
+
}
|
|
12
|
+
} catch (a) {}
|
|
13
|
+
if (!t && navigator.plugins && navigator.plugins.length > 0 && (t = navigator.plugins["Shockwave Flash"])) {
|
|
12
14
|
a = 1;
|
|
13
|
-
for (var s =
|
|
15
|
+
for (var s = t.description.split(" "), i = 0; i < s.length; i++) isNaN(parseInt(s[i])) || (e = parseInt(s[i]));
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
return {
|
|
17
19
|
f: a,
|
|
18
|
-
v:
|
|
19
|
-
}
|
|
20
|
+
v: e
|
|
21
|
+
};
|
|
20
22
|
}
|
|
21
|
-
|
|
23
|
+
|
|
24
|
+
module.exports = checkFlash;
|
package/lib/_forOwn.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function forIn(n, r, o) {
|
|
4
|
-
for (var t in n)
|
|
5
|
-
if (!1 === r.call(o, n[t], t, n)) break
|
|
4
|
+
for (var t in n) if (!1 === r.call(o, n[t], t, n)) break;
|
|
6
5
|
}
|
|
6
|
+
|
|
7
7
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
8
|
+
|
|
9
|
+
module.exports = function(n, r, o) {
|
|
10
|
+
forIn(n, (function(t, a) {
|
|
11
|
+
if (hasOwn.call(n, a)) return r.call(o, n[a], a, n);
|
|
12
|
+
}));
|
|
13
|
+
};
|
package/lib/_funcThrottle.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
module.exports = function(e, t, u, o, c) {
|
|
3
|
-
u = u || null, o = o || 500, c = c || 0, clearTimeout(e.timeoutId), c ? (e._cur = Date.now(),
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
e.call(u, t)
|
|
7
|
-
}, o)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
u = u || null, o = o || 500, c = c || 0, clearTimeout(e.timeoutId), c ? (e._cur = Date.now(),
|
|
5
|
+
e._preExecute || (e._preExecute = e._cur), e._cur - e._preExecute > c ? (e.call(u, t),
|
|
6
|
+
e._preExecute = e._cur) : e.timeoutId = setTimeout((function() {
|
|
7
|
+
e.call(u, t);
|
|
8
|
+
}), o)) : e.timeoutId = setTimeout((function() {
|
|
9
|
+
e.call(u, t);
|
|
10
|
+
}), o);
|
|
11
|
+
}, module.exports.simpleThrottle = function(e, t, u) {
|
|
12
|
+
var o, c = e, l = !0;
|
|
11
13
|
return function() {
|
|
12
|
-
var e = arguments,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
14
|
+
var e = arguments, r = this;
|
|
15
|
+
return l ? (c.apply(r, e), l = !1) : (!0 === u && (clearTimeout(o), o = null), !o && void (o = setTimeout((function() {
|
|
16
|
+
clearTimeout(o), o = null, c.apply(r, e);
|
|
17
|
+
}), t || 500)));
|
|
18
|
+
};
|
|
19
|
+
};
|
package/lib/_isnode.js
CHANGED
package/lib/_list.js
CHANGED
|
@@ -1,81 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
i =
|
|
44
|
-
|
|
45
|
-
if (u <= t || t < 0) this.add(e);
|
|
46
|
-
else {
|
|
47
|
-
for (var r = u - 1; t < r; r--) i[r + 1] = i[r];
|
|
48
|
-
i[t] = e
|
|
49
|
-
}
|
|
50
|
-
u++
|
|
51
|
-
}, this.updateValue = function(r, n) {
|
|
52
|
-
u <= 0 ? (i[u] = n, u++) : i.forEach(function(t, e) {
|
|
53
|
-
if (t[r] === n[r]) {
|
|
54
|
-
if (u <= e || e < 0) throw "IndexOutOfBoundsException";
|
|
55
|
-
i[e] = n
|
|
56
|
-
}
|
|
57
|
-
})
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"), _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")), List = {
|
|
4
|
+
ArrayList: function() {
|
|
5
|
+
var t = new Array, e = 0;
|
|
6
|
+
this.size = function() {
|
|
7
|
+
return e;
|
|
8
|
+
}, this.values = function() {
|
|
9
|
+
return t;
|
|
10
|
+
}, this.isEmpty = function() {
|
|
11
|
+
return e <= 0;
|
|
12
|
+
}, this.iterator = function(r) {
|
|
13
|
+
for (var n = 0; n < e; n++) {
|
|
14
|
+
if (0 == r.call(null, t[n], n)) return;
|
|
15
|
+
}
|
|
16
|
+
}, this.get = function(r) {
|
|
17
|
+
if (r >= e) throw "IndexOutOfBoundsException";
|
|
18
|
+
return t[r];
|
|
19
|
+
}, this.add = function(r) {
|
|
20
|
+
t[e] = r, e++;
|
|
21
|
+
}, this.addAll = function(t) {
|
|
22
|
+
for (var e = t.size(), r = 0; r < e; r++) this.add(t.get(r));
|
|
23
|
+
}, this.set = function(r, n) {
|
|
24
|
+
if (r >= e || r < 0) throw "IndexOutOfBoundsException";
|
|
25
|
+
t[r] = n;
|
|
26
|
+
}, this.remove = function(t) {
|
|
27
|
+
var e = this.indexOf(t);
|
|
28
|
+
e > -1 && this.removeAt(e);
|
|
29
|
+
}, this.removeAt = function(r) {
|
|
30
|
+
if (r >= e || r < 0) throw "argument out of range. index=" + r;
|
|
31
|
+
for (var n = e - 1, i = r; i < n; i++) t[i] = t[i + 1];
|
|
32
|
+
delete t[n], e--;
|
|
33
|
+
}, this.indexOf = function(r) {
|
|
34
|
+
if (null == r) return -1;
|
|
35
|
+
if (List.isObject(r)) {
|
|
36
|
+
for (var n = 0; n < e; n++) if (List.simpleEqual(r, t[n])) return n;
|
|
37
|
+
} else for (var i = 0; i < e; i++) if (r == t[i]) return i;
|
|
38
|
+
return -1;
|
|
39
|
+
}, this.clear = function() {
|
|
40
|
+
t = new Array, e = 0;
|
|
41
|
+
}, this.insert = function(r, n) {
|
|
42
|
+
if (r >= e || r < 0) this.add(n); else {
|
|
43
|
+
for (var i = e - 1; i > r; i--) t[i + 1] = t[i];
|
|
44
|
+
t[r] = n;
|
|
58
45
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
46
|
+
e++;
|
|
47
|
+
}, this.updateValue = function(r, n) {
|
|
48
|
+
e <= 0 ? (t[e] = n, e++) : t.forEach((function(i, u) {
|
|
49
|
+
if (i[r] !== n[r]) ; else {
|
|
50
|
+
if (u >= e || u < 0) throw "IndexOutOfBoundsException";
|
|
51
|
+
t[u] = n;
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
parse2string: function(t) {
|
|
57
|
+
return JSON.stringify(t);
|
|
58
|
+
},
|
|
59
|
+
parse2object: function(str) {
|
|
60
|
+
return eval("(" + str + ")");
|
|
61
|
+
},
|
|
62
|
+
simpleEqual: function(t, e) {
|
|
63
|
+
if (t === e) return !0;
|
|
64
|
+
if ("object" !== (0, _typeof2.default)(t) || null === t || "object" !== (0, _typeof2.default)(e) || null === e) return !1;
|
|
65
|
+
var r = Object.keys(t), n = Object.keys(e);
|
|
66
|
+
if (r.length !== n.length) return !1;
|
|
67
|
+
for (var i = hasOwnProperty.bind(e), u = 0; u < r.length; u++) if (!i(r[u]) || t[r[u]] !== e[r[u]]) return !1;
|
|
68
|
+
return !0;
|
|
69
|
+
},
|
|
70
|
+
isObject: function(t) {
|
|
71
|
+
var e = (0, _typeof2.default)(t);
|
|
72
|
+
return "function" === e || "object" === e && !!t;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
module.exports = List;
|
package/lib/_object.assign.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
getOwnPropertySymbols = Object.getOwnPropertySymbols,
|
|
5
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
6
|
-
propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"), _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")), getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
7
4
|
|
|
8
5
|
function toObject(e) {
|
|
9
6
|
if (null == e) throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
10
|
-
return Object(e)
|
|
7
|
+
return Object(e);
|
|
11
8
|
}
|
|
12
9
|
|
|
13
10
|
function shouldUseNative() {
|
|
@@ -16,22 +13,25 @@ function shouldUseNative() {
|
|
|
16
13
|
var e = new String("abc");
|
|
17
14
|
if (e[5] = "de", "5" === Object.getOwnPropertyNames(e)[0]) return !1;
|
|
18
15
|
for (var r = {}, t = 0; t < 10; t++) r["_" + String.fromCharCode(t)] = t;
|
|
19
|
-
if ("0123456789" !== Object.getOwnPropertyNames(r).map(function(e) {
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
if ("0123456789" !== Object.getOwnPropertyNames(r).map((function(e) {
|
|
17
|
+
return r[e];
|
|
18
|
+
})).join("")) return !1;
|
|
22
19
|
var n = {};
|
|
23
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(e) {
|
|
24
|
-
n[e] = e
|
|
25
|
-
}), "abcdefghijklmnopqrst" === Object.keys((0, _extends2.default)({}, n)).join("")
|
|
20
|
+
return "abcdefghijklmnopqrst".split("").forEach((function(e) {
|
|
21
|
+
n[e] = e;
|
|
22
|
+
})), "abcdefghijklmnopqrst" === Object.keys((0, _extends2.default)({}, n)).join("");
|
|
26
23
|
} catch (e) {
|
|
27
|
-
return !1
|
|
24
|
+
return !1;
|
|
28
25
|
}
|
|
29
26
|
}
|
|
27
|
+
|
|
30
28
|
module.exports = shouldUseNative() ? Object.assign : function(e, r) {
|
|
31
|
-
for (var t, n = toObject(e),
|
|
32
|
-
for (var
|
|
33
|
-
if (getOwnPropertySymbols)
|
|
34
|
-
|
|
29
|
+
for (var t, n, o = toObject(e), a = 1; a < arguments.length; a++) {
|
|
30
|
+
for (var i in t = Object(arguments[a])) hasOwnProperty.call(t, i) && (o[i] = t[i]);
|
|
31
|
+
if (getOwnPropertySymbols) {
|
|
32
|
+
n = getOwnPropertySymbols(t);
|
|
33
|
+
for (var s = 0; s < n.length; s++) propIsEnumerable.call(t, n[s]) && (o[n[s]] = t[n[s]]);
|
|
34
|
+
}
|
|
35
35
|
}
|
|
36
|
-
return
|
|
37
|
-
};
|
|
36
|
+
return o;
|
|
37
|
+
};
|
package/lib/_object.entries.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
var utils = require("./utils"), isEnumerable = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable);
|
|
4
|
+
|
|
5
|
+
module.exports = Object.entries ? Object.entries : function(e) {
|
|
5
6
|
if (!utils.isObject(e)) return [];
|
|
6
|
-
var t
|
|
7
|
-
for (
|
|
8
|
-
return
|
|
9
|
-
};
|
|
7
|
+
var t = [];
|
|
8
|
+
for (var r in e) utils.has(e, r) && isEnumerable(e, r) && t.push([ r, e[r] ]);
|
|
9
|
+
return t;
|
|
10
|
+
};
|
package/lib/_object.values.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
var utils = require("./utils"), isEnumerable = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable);
|
|
4
|
+
|
|
5
|
+
module.exports = Object.values ? Object.values : function(e) {
|
|
5
6
|
if (!utils.isObject(e)) return [];
|
|
6
|
-
var t
|
|
7
|
-
for (
|
|
8
|
-
return
|
|
9
|
-
};
|
|
7
|
+
var t = [];
|
|
8
|
+
for (var r in e) utils.has(e, r) && isEnumerable(e, r) && t.push(e[r]);
|
|
9
|
+
return t;
|
|
10
|
+
};
|
package/lib/_omit.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
2
|
+
|
|
3
|
+
var forOwn = require("./_forOwn"), _utils = require("./utils");
|
|
4
|
+
|
|
5
|
+
module.exports = function(t, n) {
|
|
6
|
+
if (!_utils.isObject(t)) return {};
|
|
7
|
+
var e, r = (n = [].concat.apply([], [].slice.call(arguments, 1)))[n.length - 1], i = {};
|
|
8
|
+
"function" == typeof r && (e = n.pop());
|
|
9
|
+
var o = "function" == typeof e;
|
|
10
|
+
return n.length || o ? (forOwn(t, (function(r, u) {
|
|
11
|
+
-1 === n.indexOf(u) && (o ? e(r, u, t) && (i[u] = r) : i[u] = r);
|
|
12
|
+
})), i) : t;
|
|
13
|
+
};
|
package/lib/_parseJson.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var trim = require("./_trim");
|
|
4
|
+
|
|
3
5
|
module.exports = function(r) {
|
|
4
6
|
if (window.JSON && window.JSON.parse) return window.JSON.parse(r + "");
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
7
|
+
var n, t = null, e = trim(r + "");
|
|
8
|
+
return e && !trim(e.replace(/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g, (function(r, e, i, u) {
|
|
9
|
+
return n && e && (t = 0), 0 === t ? r : (n = i || e, t += !u - !i, "");
|
|
10
|
+
}))) ? Function("return " + e)() : Function("Invalid JSON: " + r)();
|
|
11
|
+
};
|
package/lib/_pick.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var _utils = require("./utils");
|
|
4
|
+
|
|
3
5
|
module.exports = function(r, i) {
|
|
4
6
|
if (!_utils.isObject(r)) return {};
|
|
5
7
|
var t = {};
|
|
6
8
|
if (_utils.isString(i)) return i in r && (t[i] = r[i]), t;
|
|
7
|
-
if (_utils.isArray(i) && 0
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
9
|
+
if (_utils.isArray(i) && i.length > 0) for (var u = 0, e = i.length; u < e; u++) {
|
|
10
|
+
var s = i[u];
|
|
11
|
+
s in r && (t[s] = r[s]);
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
package/lib/_queue.js
CHANGED
|
@@ -1,65 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _ArrayHigh(r) {
|
|
4
|
-
this.array = void 0 === r ? [] : new Array(r)
|
|
4
|
+
this.array = void 0 === r ? [] : new Array(r);
|
|
5
5
|
}
|
|
6
|
+
|
|
6
7
|
_ArrayHigh.prototype = {
|
|
7
8
|
length: function() {
|
|
8
|
-
return this.array.length
|
|
9
|
+
return this.array.length;
|
|
9
10
|
},
|
|
10
11
|
at: function(r) {
|
|
11
|
-
return this.array[r]
|
|
12
|
+
return this.array[r];
|
|
12
13
|
},
|
|
13
14
|
set: function(r, t) {
|
|
14
|
-
this.array[r] = t
|
|
15
|
+
this.array[r] = t;
|
|
15
16
|
},
|
|
16
17
|
push: function(r) {
|
|
17
|
-
return this.array.push(r)
|
|
18
|
+
return this.array.push(r);
|
|
18
19
|
},
|
|
19
20
|
slice: function(r, t) {
|
|
20
|
-
return this.array = this.array.slice(r, t)
|
|
21
|
+
return this.array = this.array.slice(r, t);
|
|
21
22
|
},
|
|
22
23
|
concat: function(r) {
|
|
23
|
-
this.array = this.array.concat(r)
|
|
24
|
+
this.array = this.array.concat(r);
|
|
24
25
|
},
|
|
25
26
|
remove: function(r, t) {
|
|
26
|
-
t = void 0 === t ? 1 : t, this.array.splice(r, t)
|
|
27
|
+
t = void 0 === t ? 1 : t, this.array.splice(r, t);
|
|
27
28
|
},
|
|
28
29
|
join: function(r) {
|
|
29
|
-
return this.array.join(r)
|
|
30
|
+
return this.array.join(r);
|
|
30
31
|
},
|
|
31
32
|
clear: function() {
|
|
32
|
-
this.array.length = 0
|
|
33
|
+
this.array.length = 0;
|
|
33
34
|
}
|
|
34
35
|
};
|
|
36
|
+
|
|
35
37
|
var Queue = function() {
|
|
36
|
-
this._array_h = new _ArrayHigh
|
|
38
|
+
this._array_h = new _ArrayHigh;
|
|
37
39
|
};
|
|
40
|
+
|
|
38
41
|
Queue.prototype = {
|
|
39
42
|
_index: 0,
|
|
40
43
|
push: function(r) {
|
|
41
|
-
this._array_h.push(r)
|
|
44
|
+
this._array_h.push(r);
|
|
42
45
|
},
|
|
43
46
|
pop: function() {
|
|
44
47
|
var r = null;
|
|
45
|
-
return this._array_h.length() && (r = this._array_h.at(this._index), 2 * ++this._index >= this._array_h.length() && (this._array_h.slice(this._index),
|
|
48
|
+
return this._array_h.length() && (r = this._array_h.at(this._index), 2 * ++this._index >= this._array_h.length() && (this._array_h.slice(this._index),
|
|
49
|
+
this._index = 0)), r;
|
|
46
50
|
},
|
|
47
51
|
head: function() {
|
|
48
|
-
var r = null,
|
|
49
|
-
|
|
50
|
-
return r = t ? this._array_h.at(t - 1) : r
|
|
52
|
+
var r = null, t = this._array_h.length();
|
|
53
|
+
return t && (r = this._array_h.at(t - 1)), r;
|
|
51
54
|
},
|
|
52
55
|
tail: function() {
|
|
53
56
|
var r = null;
|
|
54
|
-
return
|
|
57
|
+
return this._array_h.length() && (r = this._array_h.at(this._index)), r;
|
|
55
58
|
},
|
|
56
59
|
length: function() {
|
|
57
|
-
return this._array_h.length() - this._index
|
|
60
|
+
return this._array_h.length() - this._index;
|
|
58
61
|
},
|
|
59
62
|
empty: function() {
|
|
60
|
-
return 0 === this._array_h.length()
|
|
63
|
+
return 0 === this._array_h.length();
|
|
61
64
|
},
|
|
62
65
|
clear: function() {
|
|
63
|
-
this._array_h.clear()
|
|
66
|
+
this._array_h.clear();
|
|
64
67
|
}
|
|
65
|
-
}, module.exports = Queue;
|
|
68
|
+
}, module.exports = Queue;
|