ddan-js 2.9.4 → 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 (131) hide show
  1. package/bin/ddan-js.esm.js +1 -1
  2. package/bin/ddan-js.js +1 -1
  3. package/bin/types/browser.d.ts +1 -1
  4. package/bin/types/index.d.ts +2 -1
  5. package/bin/types/modules/node/index.d.ts +2 -0
  6. package/package.json +18 -13
  7. package/bin/lib/browser.js +0 -111
  8. package/bin/lib/class/event.js +0 -104
  9. package/bin/lib/class/getset.js +0 -12
  10. package/bin/lib/class/icon.js +0 -94
  11. package/bin/lib/class/joker.js +0 -121
  12. package/bin/lib/class/kvalue.js +0 -29
  13. package/bin/lib/class/mapping.js +0 -82
  14. package/bin/lib/class/persist.js +0 -65
  15. package/bin/lib/class/pipeTask.js +0 -42
  16. package/bin/lib/class/pipeparallel.js +0 -24
  17. package/bin/lib/class/store.js +0 -87
  18. package/bin/lib/class/tracker.js +0 -125
  19. package/bin/lib/class/watermark.js +0 -63
  20. package/bin/lib/common/_Symbol.js +0 -5
  21. package/bin/lib/common/_freeGlobal.js +0 -5
  22. package/bin/lib/common/_object.js +0 -40
  23. package/bin/lib/common/_root.js +0 -10
  24. package/bin/lib/common/internal/asciiToArray.js +0 -13
  25. package/bin/lib/common/internal/castSlice.js +0 -18
  26. package/bin/lib/common/internal/createCaseFirst.js +0 -30
  27. package/bin/lib/common/internal/hasUnicode.js +0 -26
  28. package/bin/lib/common/internal/nodeTypes.js +0 -26
  29. package/bin/lib/common/internal/slice.js +0 -46
  30. package/bin/lib/common/internal/stringToArray.js +0 -18
  31. package/bin/lib/common/internal/unicodeToArray.js +0 -40
  32. package/bin/lib/common/internal/unicodeWords.js +0 -67
  33. package/bin/lib/index.js +0 -114
  34. package/bin/lib/modules/browser/ecdh.js +0 -124
  35. package/bin/lib/modules/browser/index.js +0 -4
  36. package/bin/lib/modules/cdn.js +0 -62
  37. package/bin/lib/modules/convert/base.js +0 -125
  38. package/bin/lib/modules/convert/base64.js +0 -114
  39. package/bin/lib/modules/convert/index.js +0 -99
  40. package/bin/lib/modules/convert/md5.js +0 -222
  41. package/bin/lib/modules/convert/pkcs.js +0 -16
  42. package/bin/lib/modules/convert/utf8.js +0 -106
  43. package/bin/lib/modules/crypto/base64.js +0 -14
  44. package/bin/lib/modules/crypto/const.js +0 -7
  45. package/bin/lib/modules/crypto/index.js +0 -30
  46. package/bin/lib/modules/crypto/rsa.js +0 -143
  47. package/bin/lib/modules/crypto/tea.js +0 -79
  48. package/bin/lib/modules/crypto/uuid.js +0 -34
  49. package/bin/lib/modules/css.js +0 -137
  50. package/bin/lib/modules/decorator.js +0 -14
  51. package/bin/lib/modules/fetch.js +0 -82
  52. package/bin/lib/modules/gbk.js +0 -46
  53. package/bin/lib/modules/hook/base.js +0 -60
  54. package/bin/lib/modules/hook/hooker.js +0 -39
  55. package/bin/lib/modules/hook/index.js +0 -49
  56. package/bin/lib/modules/hook/log.js +0 -54
  57. package/bin/lib/modules/hook/modules/bezier.js +0 -121
  58. package/bin/lib/modules/hook/modules/debounce.js +0 -127
  59. package/bin/lib/modules/hook/modules/mutex.js +0 -22
  60. package/bin/lib/modules/hook/modules/pipeline.js +0 -59
  61. package/bin/lib/modules/hook/modules/polling.js +0 -20
  62. package/bin/lib/modules/hook/modules/safeTask.js +0 -25
  63. package/bin/lib/modules/hook/modules/throttle.js +0 -30
  64. package/bin/lib/modules/html.js +0 -293
  65. package/bin/lib/modules/http/index.js +0 -171
  66. package/bin/lib/modules/http/interceptor.js +0 -22
  67. package/bin/lib/modules/list/base.js +0 -37
  68. package/bin/lib/modules/list/index.js +0 -90
  69. package/bin/lib/modules/logger.js +0 -55
  70. package/bin/lib/modules/math/index.js +0 -118
  71. package/bin/lib/modules/mini/diff.js +0 -97
  72. package/bin/lib/modules/mini/http/index.js +0 -155
  73. package/bin/lib/modules/mini/index.js +0 -71
  74. package/bin/lib/modules/node/aliyun.js +0 -156
  75. package/bin/lib/modules/node/brotli.js +0 -46
  76. package/bin/lib/modules/node/child.js +0 -18
  77. package/bin/lib/modules/node/ecdh-web.js +0 -11
  78. package/bin/lib/modules/node/ecdh.js +0 -115
  79. package/bin/lib/modules/node/file.js +0 -25
  80. package/bin/lib/modules/node/index.js +0 -11
  81. package/bin/lib/modules/node/proxy.js +0 -147
  82. package/bin/lib/modules/node/rsa-web.js +0 -19
  83. package/bin/lib/modules/node/socks5.js +0 -424
  84. package/bin/lib/modules/obj/index.js +0 -184
  85. package/bin/lib/modules/qs/base.js +0 -5
  86. package/bin/lib/modules/qs/decode.js +0 -45
  87. package/bin/lib/modules/qs/encode.js +0 -53
  88. package/bin/lib/modules/qs/index.js +0 -152
  89. package/bin/lib/modules/regex.js +0 -16
  90. package/bin/lib/modules/rsa.js +0 -18
  91. package/bin/lib/modules/rule/async-validator/index.js +0 -306
  92. package/bin/lib/modules/rule/async-validator/interface.js +0 -2
  93. package/bin/lib/modules/rule/async-validator/messages.js +0 -59
  94. package/bin/lib/modules/rule/async-validator/rule/enum.js +0 -13
  95. package/bin/lib/modules/rule/async-validator/rule/index.js +0 -16
  96. package/bin/lib/modules/rule/async-validator/rule/pattern.js +0 -27
  97. package/bin/lib/modules/rule/async-validator/rule/range.js +0 -54
  98. package/bin/lib/modules/rule/async-validator/rule/required.js +0 -12
  99. package/bin/lib/modules/rule/async-validator/rule/type.js +0 -98
  100. package/bin/lib/modules/rule/async-validator/rule/url.js +0 -55
  101. package/bin/lib/modules/rule/async-validator/rule/whitespace.js +0 -20
  102. package/bin/lib/modules/rule/async-validator/util.js +0 -255
  103. package/bin/lib/modules/rule/async-validator/validator/any.js +0 -16
  104. package/bin/lib/modules/rule/async-validator/validator/array.js +0 -19
  105. package/bin/lib/modules/rule/async-validator/validator/boolean.js +0 -20
  106. package/bin/lib/modules/rule/async-validator/validator/date.js +0 -31
  107. package/bin/lib/modules/rule/async-validator/validator/enum.js +0 -20
  108. package/bin/lib/modules/rule/async-validator/validator/float.js +0 -20
  109. package/bin/lib/modules/rule/async-validator/validator/index.js +0 -36
  110. package/bin/lib/modules/rule/async-validator/validator/integer.js +0 -20
  111. package/bin/lib/modules/rule/async-validator/validator/method.js +0 -19
  112. package/bin/lib/modules/rule/async-validator/validator/number.js +0 -23
  113. package/bin/lib/modules/rule/async-validator/validator/object.js +0 -19
  114. package/bin/lib/modules/rule/async-validator/validator/pattern.js +0 -19
  115. package/bin/lib/modules/rule/async-validator/validator/regexp.js +0 -19
  116. package/bin/lib/modules/rule/async-validator/validator/required.js +0 -10
  117. package/bin/lib/modules/rule/async-validator/validator/string.js +0 -24
  118. package/bin/lib/modules/rule/async-validator/validator/type.js +0 -20
  119. package/bin/lib/modules/rule/index.js +0 -67
  120. package/bin/lib/modules/string/index.js +0 -121
  121. package/bin/lib/modules/string/words.js +0 -33
  122. package/bin/lib/modules/time/const.js +0 -11
  123. package/bin/lib/modules/time/dtime.js +0 -132
  124. package/bin/lib/modules/time/frame.js +0 -49
  125. package/bin/lib/modules/time/index.js +0 -84
  126. package/bin/lib/typings/index.js +0 -2
  127. package/bin/lib/util/function.js +0 -33
  128. package/bin/lib/util/includes.js +0 -96
  129. package/bin/lib/util/index.js +0 -26
  130. package/bin/lib/util/is.js +0 -148
  131. package/bin/lib/util/to.js +0 -47
@@ -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 };