ddan-js 2.9.3 → 2.9.5

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 (133) hide show
  1. package/bin/ddan-js.browser.js +1 -1
  2. package/bin/ddan-js.esm.js +1 -1
  3. package/bin/ddan-js.js +1 -1
  4. package/bin/types/browser.d.ts +3 -3
  5. package/bin/types/index.d.ts +4 -3
  6. package/bin/types/modules/fetch.d.ts +1 -1
  7. package/bin/types/modules/node/index.d.ts +2 -0
  8. package/package.json +18 -13
  9. package/bin/lib/browser.js +0 -111
  10. package/bin/lib/class/event.js +0 -104
  11. package/bin/lib/class/getset.js +0 -12
  12. package/bin/lib/class/icon.js +0 -94
  13. package/bin/lib/class/joker.js +0 -121
  14. package/bin/lib/class/kvalue.js +0 -29
  15. package/bin/lib/class/mapping.js +0 -82
  16. package/bin/lib/class/persist.js +0 -65
  17. package/bin/lib/class/pipeTask.js +0 -42
  18. package/bin/lib/class/pipeparallel.js +0 -24
  19. package/bin/lib/class/store.js +0 -87
  20. package/bin/lib/class/tracker.js +0 -125
  21. package/bin/lib/class/watermark.js +0 -63
  22. package/bin/lib/common/_Symbol.js +0 -5
  23. package/bin/lib/common/_freeGlobal.js +0 -5
  24. package/bin/lib/common/_object.js +0 -40
  25. package/bin/lib/common/_root.js +0 -10
  26. package/bin/lib/common/internal/asciiToArray.js +0 -13
  27. package/bin/lib/common/internal/castSlice.js +0 -18
  28. package/bin/lib/common/internal/createCaseFirst.js +0 -30
  29. package/bin/lib/common/internal/hasUnicode.js +0 -26
  30. package/bin/lib/common/internal/nodeTypes.js +0 -26
  31. package/bin/lib/common/internal/slice.js +0 -46
  32. package/bin/lib/common/internal/stringToArray.js +0 -18
  33. package/bin/lib/common/internal/unicodeToArray.js +0 -40
  34. package/bin/lib/common/internal/unicodeWords.js +0 -67
  35. package/bin/lib/index.js +0 -114
  36. package/bin/lib/modules/browser/ecdh.js +0 -124
  37. package/bin/lib/modules/browser/index.js +0 -4
  38. package/bin/lib/modules/cdn.js +0 -62
  39. package/bin/lib/modules/convert/base.js +0 -125
  40. package/bin/lib/modules/convert/base64.js +0 -114
  41. package/bin/lib/modules/convert/index.js +0 -99
  42. package/bin/lib/modules/convert/md5.js +0 -222
  43. package/bin/lib/modules/convert/pkcs.js +0 -16
  44. package/bin/lib/modules/convert/utf8.js +0 -106
  45. package/bin/lib/modules/crypto/base64.js +0 -14
  46. package/bin/lib/modules/crypto/const.js +0 -7
  47. package/bin/lib/modules/crypto/index.js +0 -30
  48. package/bin/lib/modules/crypto/rsa.js +0 -143
  49. package/bin/lib/modules/crypto/tea.js +0 -79
  50. package/bin/lib/modules/crypto/uuid.js +0 -34
  51. package/bin/lib/modules/css.js +0 -137
  52. package/bin/lib/modules/decorator.js +0 -14
  53. package/bin/lib/modules/fetch.js +0 -82
  54. package/bin/lib/modules/gbk.js +0 -46
  55. package/bin/lib/modules/hook/base.js +0 -60
  56. package/bin/lib/modules/hook/hooker.js +0 -39
  57. package/bin/lib/modules/hook/index.js +0 -49
  58. package/bin/lib/modules/hook/log.js +0 -54
  59. package/bin/lib/modules/hook/modules/bezier.js +0 -121
  60. package/bin/lib/modules/hook/modules/debounce.js +0 -127
  61. package/bin/lib/modules/hook/modules/mutex.js +0 -22
  62. package/bin/lib/modules/hook/modules/pipeline.js +0 -59
  63. package/bin/lib/modules/hook/modules/polling.js +0 -20
  64. package/bin/lib/modules/hook/modules/safeTask.js +0 -25
  65. package/bin/lib/modules/hook/modules/throttle.js +0 -30
  66. package/bin/lib/modules/html.js +0 -293
  67. package/bin/lib/modules/http/index.js +0 -171
  68. package/bin/lib/modules/http/interceptor.js +0 -22
  69. package/bin/lib/modules/list/base.js +0 -37
  70. package/bin/lib/modules/list/index.js +0 -90
  71. package/bin/lib/modules/logger.js +0 -55
  72. package/bin/lib/modules/math/index.js +0 -118
  73. package/bin/lib/modules/mini/diff.js +0 -97
  74. package/bin/lib/modules/mini/http/index.js +0 -155
  75. package/bin/lib/modules/mini/index.js +0 -71
  76. package/bin/lib/modules/node/aliyun.js +0 -156
  77. package/bin/lib/modules/node/brotli.js +0 -46
  78. package/bin/lib/modules/node/child.js +0 -18
  79. package/bin/lib/modules/node/ecdh-web.js +0 -11
  80. package/bin/lib/modules/node/ecdh.js +0 -115
  81. package/bin/lib/modules/node/file.js +0 -25
  82. package/bin/lib/modules/node/index.js +0 -11
  83. package/bin/lib/modules/node/proxy.js +0 -147
  84. package/bin/lib/modules/node/rsa-web.js +0 -19
  85. package/bin/lib/modules/node/socks5.js +0 -424
  86. package/bin/lib/modules/obj/index.js +0 -184
  87. package/bin/lib/modules/qs/base.js +0 -5
  88. package/bin/lib/modules/qs/decode.js +0 -45
  89. package/bin/lib/modules/qs/encode.js +0 -53
  90. package/bin/lib/modules/qs/index.js +0 -114
  91. package/bin/lib/modules/regex.js +0 -16
  92. package/bin/lib/modules/rsa.js +0 -18
  93. package/bin/lib/modules/rule/async-validator/index.js +0 -306
  94. package/bin/lib/modules/rule/async-validator/interface.js +0 -2
  95. package/bin/lib/modules/rule/async-validator/messages.js +0 -59
  96. package/bin/lib/modules/rule/async-validator/rule/enum.js +0 -13
  97. package/bin/lib/modules/rule/async-validator/rule/index.js +0 -16
  98. package/bin/lib/modules/rule/async-validator/rule/pattern.js +0 -27
  99. package/bin/lib/modules/rule/async-validator/rule/range.js +0 -54
  100. package/bin/lib/modules/rule/async-validator/rule/required.js +0 -12
  101. package/bin/lib/modules/rule/async-validator/rule/type.js +0 -98
  102. package/bin/lib/modules/rule/async-validator/rule/url.js +0 -55
  103. package/bin/lib/modules/rule/async-validator/rule/whitespace.js +0 -20
  104. package/bin/lib/modules/rule/async-validator/util.js +0 -255
  105. package/bin/lib/modules/rule/async-validator/validator/any.js +0 -16
  106. package/bin/lib/modules/rule/async-validator/validator/array.js +0 -19
  107. package/bin/lib/modules/rule/async-validator/validator/boolean.js +0 -20
  108. package/bin/lib/modules/rule/async-validator/validator/date.js +0 -31
  109. package/bin/lib/modules/rule/async-validator/validator/enum.js +0 -20
  110. package/bin/lib/modules/rule/async-validator/validator/float.js +0 -20
  111. package/bin/lib/modules/rule/async-validator/validator/index.js +0 -36
  112. package/bin/lib/modules/rule/async-validator/validator/integer.js +0 -20
  113. package/bin/lib/modules/rule/async-validator/validator/method.js +0 -19
  114. package/bin/lib/modules/rule/async-validator/validator/number.js +0 -23
  115. package/bin/lib/modules/rule/async-validator/validator/object.js +0 -19
  116. package/bin/lib/modules/rule/async-validator/validator/pattern.js +0 -19
  117. package/bin/lib/modules/rule/async-validator/validator/regexp.js +0 -19
  118. package/bin/lib/modules/rule/async-validator/validator/required.js +0 -10
  119. package/bin/lib/modules/rule/async-validator/validator/string.js +0 -24
  120. package/bin/lib/modules/rule/async-validator/validator/type.js +0 -20
  121. package/bin/lib/modules/rule/index.js +0 -67
  122. package/bin/lib/modules/string/index.js +0 -121
  123. package/bin/lib/modules/string/words.js +0 -33
  124. package/bin/lib/modules/time/const.js +0 -11
  125. package/bin/lib/modules/time/dtime.js +0 -132
  126. package/bin/lib/modules/time/frame.js +0 -49
  127. package/bin/lib/modules/time/index.js +0 -84
  128. package/bin/lib/typings/index.js +0 -2
  129. package/bin/lib/util/function.js +0 -33
  130. package/bin/lib/util/includes.js +0 -96
  131. package/bin/lib/util/index.js +0 -26
  132. package/bin/lib/util/is.js +0 -148
  133. package/bin/lib/util/to.js +0 -47
@@ -1,96 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const is_1 = require("./is");
4
- const to_1 = require("./to");
5
- const _object_1 = require("../common/_object");
6
- function arrayMap(array, iteratee) {
7
- var index = -1, length = array ? array.length : 0, result = Array(length);
8
- while (++index < length) {
9
- result[index] = iteratee(array[index], index, array);
10
- }
11
- return result;
12
- }
13
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
14
- var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
15
- while ((fromRight ? index-- : ++index < length)) {
16
- if (predicate(array[index], index, array)) {
17
- return index;
18
- }
19
- }
20
- return -1;
21
- }
22
- function baseIndexOf(array, value, fromIndex) {
23
- if (value !== value)
24
- return baseFindIndex(array, baseIsNaN, fromIndex);
25
- var index = fromIndex - 1, length = array.length;
26
- while (++index < length) {
27
- if (array[index] === value) {
28
- return index;
29
- }
30
- }
31
- return -1;
32
- }
33
- function baseIsNaN(value) {
34
- return value !== value;
35
- }
36
- function baseTimes(n, iteratee) {
37
- var index = -1, result = Array(n);
38
- while (++index < n) {
39
- result[index] = iteratee(index);
40
- }
41
- return result;
42
- }
43
- function baseValues(object, props) {
44
- return arrayMap(props, function (key) {
45
- return object[key];
46
- });
47
- }
48
- function overArg(func, transform) {
49
- return function (arg) {
50
- return func(transform(arg));
51
- };
52
- }
53
- var nativeKeys = overArg(Object.keys, Object), nativeMax = Math.max;
54
- function arrayLikeKeys(value, inherited) {
55
- var result = (is_1.default.isArray(value) || is_1.default.isArguments(value))
56
- ? baseTimes(value.length, String)
57
- : [];
58
- var length = result.length, skipIndexes = !!length;
59
- for (var key in value) {
60
- if ((inherited || _object_1.default.hasOwnProperty.call(value, key)) &&
61
- !(skipIndexes && (key == 'length' || is_1.default.isIndex(key, length)))) {
62
- result.push(key);
63
- }
64
- }
65
- return result;
66
- }
67
- function baseKeys(object) {
68
- if (!is_1.default.isPrototype(object)) {
69
- return nativeKeys(object);
70
- }
71
- var result = [];
72
- for (var key in Object(object)) {
73
- if (_object_1.default.hasOwnProperty.call(object, key) && key != 'constructor') {
74
- result.push(key);
75
- }
76
- }
77
- return result;
78
- }
79
- function includes(collection, value, fromIndex, guard) {
80
- collection = is_1.default.isArrayLike(collection) ? collection : values(collection);
81
- fromIndex = (fromIndex && !guard) ? to_1.default.toInteger(fromIndex) : 0;
82
- var length = collection.length;
83
- if (fromIndex < 0) {
84
- fromIndex = nativeMax(length + fromIndex, 0);
85
- }
86
- return is_1.default.isString(collection)
87
- ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
88
- : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
89
- }
90
- function keys(object) {
91
- return is_1.default.isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
92
- }
93
- function values(object) {
94
- return object ? baseValues(object, keys(object)) : [];
95
- }
96
- exports.default = includes;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const is_1 = require("./is");
4
- const includes_1 = require("./includes");
5
- const _object_1 = require("../common/_object");
6
- const obj_1 = require("../modules/obj");
7
- const function_1 = require("./function");
8
- const forof = (source, cb) => {
9
- if (!source)
10
- return;
11
- let entries;
12
- if (!is_1.default.isObject(source))
13
- return;
14
- if (is_1.default.isArray(source)) {
15
- entries = source.entries();
16
- }
17
- else {
18
- entries = Object.entries(source);
19
- }
20
- if (!entries)
21
- return;
22
- for (const [key, value] of entries) {
23
- cb && cb(key, value);
24
- }
25
- };
26
- exports.default = { ...is_1.default, ..._object_1.default, ...obj_1.default, ...function_1.default, includes: includes_1.default, forof };
@@ -1,148 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const _object_1 = require("../common/_object");
4
- const _root_1 = require("../common/_root");
5
- const nodeTypes_1 = require("../common/internal/nodeTypes");
6
- /** `Object#toString` result references. */
7
- var argsTag = '[object Arguments]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', asyncTag = '[object AsyncFunction]', stringTag = '[object String]', promiseTag = '[object Promise]';
8
- var MAX_SAFE_INTEGER = 9007199254740991, NAN = 0 / 0;
9
- /** Used to detect unsigned integer values. */
10
- const reIsUint = /^(?:0|[1-9]\d*)$/;
11
- const nativeIsBuffer = _root_1.default?.Buffer?.isBuffer;
12
- const reTypedTag = /^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)Array\]$/;
13
- /* Node.js helper references. */
14
- const nodeIsTypedArray = nodeTypes_1.default && nodeTypes_1.default.isTypedArray;
15
- function is(val, type) {
16
- return _object_1.default.getTag(val) === `[object ${type}]`;
17
- }
18
- function isNumber(value) {
19
- return _object_1.default.getTag(value) === '[object Number]';
20
- }
21
- function isString(value) {
22
- return (typeof value == 'string' ||
23
- (!isArray(value) && isObjectLike(value) && _object_1.default.getTag(value) == stringTag));
24
- }
25
- function isObject(value) {
26
- const type = typeof value;
27
- return value != null && (type == 'object' || type == 'function');
28
- }
29
- function isObjectLike(value) {
30
- return value != null && typeof value == 'object';
31
- }
32
- function isPlainObject(value) {
33
- if (!isObjectLike(value) || _object_1.default.getTag(value) != '[object Object]') {
34
- return false;
35
- }
36
- if (Object.getPrototypeOf(value) === null) {
37
- return true;
38
- }
39
- let proto = value;
40
- while (Object.getPrototypeOf(proto) !== null) {
41
- proto = Object.getPrototypeOf(proto);
42
- }
43
- return Object.getPrototypeOf(value) === proto;
44
- }
45
- function isSymbol(value) {
46
- return (typeof value === 'symbol' ||
47
- (isObjectLike(value) && _object_1.default.getTag(value) === '[object Symbol]'));
48
- }
49
- const isArray = Array.isArray;
50
- function isArrayLike(value) {
51
- return value != null && isLength(value.length) && !isFunction(value);
52
- }
53
- function isArrayLikeObject(value) {
54
- return isObjectLike(value) && isArrayLike(value);
55
- }
56
- function isFunction(value) {
57
- var tag = isObject(value) ? _object_1.default.getTag(value) : '';
58
- return tag === funcTag || tag === genTag || tag === asyncTag;
59
- }
60
- function isPromise(value) {
61
- var tag = isObject(value) ? _object_1.default.getTag(value) : '';
62
- return tag === promiseTag;
63
- }
64
- function isLength(value) {
65
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
66
- }
67
- function isIndex(value, length) {
68
- length = length == null ? MAX_SAFE_INTEGER : length;
69
- return (!!length &&
70
- (typeof value == 'number' || reIsUint.test(value)) &&
71
- value > -1 &&
72
- value % 1 == 0 &&
73
- value < length);
74
- }
75
- function isPrototype(value) {
76
- var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || Object.prototype;
77
- return value === proto;
78
- }
79
- function isArguments(value) {
80
- return (isArrayLikeObject(value) &&
81
- _object_1.default.hasOwnProperty.call(value, 'callee') &&
82
- (!_object_1.default.propertyIsEnumerable.call(value, 'callee') || _object_1.default.toString.call(value) == argsTag));
83
- }
84
- const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
85
- const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
86
- const isBlobOrBuffer = (data) => {
87
- return data instanceof Blob || data instanceof ArrayBuffer;
88
- };
89
- const isUint8Array = (data) => {
90
- return data instanceof Uint8Array;
91
- };
92
- const isArrayBuffer = (data) => {
93
- return data instanceof ArrayBuffer;
94
- };
95
- const isTypedArray = nodeIsTypedArray
96
- ? (value) => nodeIsTypedArray(value)
97
- : (value) => isObjectLike(value) && reTypedTag.test(_object_1.default.getTag(value));
98
- const isBuffer = typeof nativeIsBuffer === 'function' ? nativeIsBuffer : () => false;
99
- const isEmpty = (value) => {
100
- if (value == null) {
101
- return true;
102
- }
103
- if (isArrayLike(value) &&
104
- (Array.isArray(value) ||
105
- typeof value === 'string' ||
106
- typeof value.splice === 'function' ||
107
- isBuffer(value) ||
108
- isTypedArray(value) ||
109
- isArguments(value))) {
110
- return !value.length;
111
- }
112
- const tag = _object_1.default.getTag(value);
113
- if (tag === '[object Map]' || tag === '[object Set]') {
114
- return !value.size;
115
- }
116
- if (isPrototype(value)) {
117
- return !Object.keys(value).length;
118
- }
119
- for (const key in value) {
120
- if (_object_1.default.hasOwnProperty.call(value, key)) {
121
- return false;
122
- }
123
- }
124
- return true;
125
- };
126
- exports.default = {
127
- is,
128
- isNumber,
129
- isString,
130
- isObject,
131
- isObjectLike,
132
- isPlainObject,
133
- isSymbol,
134
- isFunction,
135
- isArray,
136
- isArrayLikeObject,
137
- isIndex,
138
- isArrayLike,
139
- isPrototype,
140
- isArguments,
141
- isPromise,
142
- isBrowser,
143
- isNode,
144
- isBlobOrBuffer,
145
- isUint8Array,
146
- isArrayBuffer,
147
- isEmpty,
148
- };
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const is_1 = require("./is");
4
- const NAN = 0 / 0;
5
- const reTrim = /^\s+|\s+$/g;
6
- const reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
7
- const reIsBinary = /^0b[01]+$/i;
8
- const reIsOctal = /^0o[0-7]+$/i;
9
- const freeParseInt = parseInt;
10
- const INFINITY = 1 / 0;
11
- const MAX_INTEGER = 1.7976931348623157e+308;
12
- function toNumber(value) {
13
- if (typeof value == 'number') {
14
- return value;
15
- }
16
- if (is_1.default.isSymbol(value)) {
17
- return NAN;
18
- }
19
- if (is_1.default.isObject(value)) {
20
- const other = typeof value.valueOf == 'function' ? value.valueOf() : value;
21
- value = is_1.default.isObject(other) ? (other + '') : other;
22
- }
23
- if (typeof value != 'string') {
24
- return value === 0 ? value : +value;
25
- }
26
- value = value.replace(reTrim, '');
27
- const isBinary = reIsBinary.test(value);
28
- return (isBinary || reIsOctal.test(value))
29
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
30
- : (reIsBadHex.test(value) ? NAN : +value);
31
- }
32
- function toFinite(value) {
33
- if (!value) {
34
- return value === 0 ? value : 0;
35
- }
36
- value = toNumber(value);
37
- if (value === INFINITY || value === -INFINITY) {
38
- var sign = (value < 0 ? -1 : 1);
39
- return sign * MAX_INTEGER;
40
- }
41
- return value === value ? value : 0;
42
- }
43
- function toInteger(value) {
44
- var result = toFinite(value), remainder = result % 1;
45
- return result === result ? (remainder ? result - remainder : result) : 0;
46
- }
47
- exports.default = { toNumber, toFinite, toInteger };