@airgap/coinlib-core 0.13.46 → 0.13.47

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 (124) hide show
  1. package/dependencies/src/axios-0.33.0/index.d.ts +345 -0
  2. package/dependencies/src/axios-0.33.0/lib/adapters/http.js +771 -0
  3. package/dependencies/src/axios-0.33.0/lib/adapters/xhr.js +305 -0
  4. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/axios.js +22 -7
  5. package/dependencies/src/axios-0.33.0/lib/cancel/CancelToken.js +118 -0
  6. package/dependencies/src/axios-0.33.0/lib/cancel/CanceledError.js +24 -0
  7. package/dependencies/src/axios-0.33.0/lib/core/Axios.js +178 -0
  8. package/dependencies/src/axios-0.33.0/lib/core/AxiosError.js +173 -0
  9. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/core/InterceptorManager.js +13 -2
  10. package/dependencies/src/axios-0.33.0/lib/core/buildFullPath.js +23 -0
  11. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/core/dispatchRequest.js +34 -16
  12. package/dependencies/src/axios-0.33.0/lib/core/mergeConfig.js +117 -0
  13. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/core/settle.js +4 -4
  14. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/core/transformData.js +5 -2
  15. package/dependencies/src/axios-0.33.0/lib/defaults/index.js +181 -0
  16. package/dependencies/src/axios-0.33.0/lib/defaults/transitional.js +7 -0
  17. package/dependencies/src/axios-0.33.0/lib/env/classes/FormData.js +2 -0
  18. package/dependencies/src/axios-0.33.0/lib/env/data.js +3 -0
  19. package/dependencies/src/axios-0.33.0/lib/helpers/AxiosURLSearchParams.js +50 -0
  20. package/dependencies/src/axios-0.33.0/lib/helpers/bind.js +7 -0
  21. package/dependencies/src/axios-0.33.0/lib/helpers/buildURL.js +63 -0
  22. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/helpers/combineURLs.js +1 -1
  23. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/helpers/cookies.js +15 -2
  24. package/dependencies/src/axios-0.33.0/lib/helpers/defaultRedactKeys.js +3 -0
  25. package/dependencies/src/axios-0.33.0/lib/helpers/estimateDataURLDecodedBytes.js +79 -0
  26. package/dependencies/src/axios-0.33.0/lib/helpers/formDataToJSON.js +91 -0
  27. package/dependencies/src/axios-0.33.0/lib/helpers/fromDataURI.js +51 -0
  28. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/helpers/isAbsoluteURL.js +1 -1
  29. package/dependencies/src/axios-0.33.0/lib/helpers/isAxiosError.js +13 -0
  30. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/helpers/isURLSameOrigin.js +12 -12
  31. package/dependencies/src/axios-0.33.0/lib/helpers/null.js +2 -0
  32. package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/helpers/parseHeaders.js +2 -2
  33. package/dependencies/src/axios-0.33.0/lib/helpers/parseProtocol.js +6 -0
  34. package/dependencies/src/axios-0.33.0/lib/helpers/sanitizeHeaderValue.js +22 -0
  35. package/dependencies/src/axios-0.33.0/lib/helpers/shouldBypassProxy.js +187 -0
  36. package/dependencies/src/axios-0.33.0/lib/helpers/toFormData.js +212 -0
  37. package/dependencies/src/axios-0.33.0/lib/helpers/toURLEncodedForm.js +18 -0
  38. package/dependencies/src/axios-0.33.0/lib/helpers/validator.js +86 -0
  39. package/dependencies/src/axios-0.33.0/lib/platform/browser/classes/FormData.js +3 -0
  40. package/dependencies/src/axios-0.33.0/lib/platform/browser/classes/URLSearchParams.js +5 -0
  41. package/dependencies/src/axios-0.33.0/lib/platform/browser/index.js +11 -0
  42. package/dependencies/src/axios-0.33.0/lib/platform/index.js +3 -0
  43. package/dependencies/src/axios-0.33.0/lib/platform/node/classes/FormData.js +3 -0
  44. package/dependencies/src/axios-0.33.0/lib/platform/node/classes/URLSearchParams.js +5 -0
  45. package/dependencies/src/axios-0.33.0/lib/platform/node/index.js +11 -0
  46. package/dependencies/src/axios-0.33.0/lib/utils.js +565 -0
  47. package/dependencies/src/axios-0.33.0/package.json +100 -0
  48. package/dependencies/src/{bn.js-4.11.8 → bn.js-4.11.9}/lib/bn.js +7 -1
  49. package/dependencies/src/{elliptic-6.5.3 → elliptic-6.6.1}/lib/elliptic/curve/base.js +36 -31
  50. package/dependencies/src/{elliptic-6.5.1 → elliptic-6.6.1}/lib/elliptic/curve/edwards.js +13 -10
  51. package/dependencies/src/{elliptic-6.5.3 → elliptic-6.6.1}/lib/elliptic/curve/mont.js +1 -1
  52. package/dependencies/src/{elliptic-6.5.1 → elliptic-6.6.1}/lib/elliptic/curve/short.js +48 -47
  53. package/dependencies/src/{elliptic-6.5.3 → elliptic-6.6.1}/lib/elliptic/curves.js +21 -21
  54. package/dependencies/src/{elliptic-6.5.1 → elliptic-6.6.1}/lib/elliptic/ec/index.js +53 -16
  55. package/dependencies/src/{elliptic-6.5.3 → elliptic-6.6.1}/lib/elliptic/ec/key.js +8 -5
  56. package/dependencies/src/{elliptic-6.5.3 → elliptic-6.6.1}/lib/elliptic/ec/signature.js +11 -1
  57. package/dependencies/src/{elliptic-6.5.3 → elliptic-6.6.1}/lib/elliptic/eddsa/index.js +5 -2
  58. package/dependencies/src/{elliptic-6.5.3 → elliptic-6.6.1}/lib/elliptic/eddsa/signature.js +3 -2
  59. package/dependencies/src/{elliptic-6.5.1 → elliptic-6.6.1}/lib/elliptic/precomputed/secp256k1.js +197 -197
  60. package/dependencies/src/{elliptic-6.5.3 → elliptic-6.6.1}/lib/elliptic/utils.js +12 -9
  61. package/dependencies/src/{elliptic-6.5.1 → elliptic-6.6.1}/package.json +20 -22
  62. package/dependencies/src/ethereumjs-util-5.2.0/index.js +1 -1
  63. package/dependencies/src/follow-redirects-1.16.0/debug.js +15 -0
  64. package/dependencies/src/follow-redirects-1.16.0/index.js +709 -0
  65. package/dependencies/src/follow-redirects-1.16.0/package.json +58 -0
  66. package/dependencies/src/proxy-from-env-1.1.0/index.js +108 -0
  67. package/dependencies/src/proxy-from-env-1.1.0/package.json +34 -0
  68. package/dependencies/src/secp256k1-3.7.1/lib/elliptic/index.js +2 -2
  69. package/dependencies/src/secp256k1-4.0.2/lib/elliptic.js +1 -1
  70. package/dependencies/src/tiny-secp256k1-1.1.3/js.js +2 -2
  71. package/errors/index.d.ts +2 -2
  72. package/errors/index.js.map +1 -1
  73. package/package.json +2 -2
  74. package/utils/remote-data/HttpRemoteData.js +3 -8
  75. package/utils/remote-data/HttpRemoteData.js.map +1 -1
  76. package/utils/remote-data/IpfsRemoteData.js +13 -7
  77. package/utils/remote-data/IpfsRemoteData.js.map +1 -1
  78. package/utils/remote-data/Sha256RemoteData.js +5 -6
  79. package/utils/remote-data/Sha256RemoteData.js.map +1 -1
  80. package/utils/remote-data/remoteDataRequest.d.ts +16 -0
  81. package/utils/remote-data/remoteDataRequest.js +240 -0
  82. package/utils/remote-data/remoteDataRequest.js.map +1 -0
  83. package/dependencies/src/axios-0.19.0/index.d.ts +0 -152
  84. package/dependencies/src/axios-0.19.0/lib/adapters/http.js +0 -275
  85. package/dependencies/src/axios-0.19.0/lib/adapters/xhr.js +0 -174
  86. package/dependencies/src/axios-0.19.0/lib/cancel/Cancel.js +0 -19
  87. package/dependencies/src/axios-0.19.0/lib/cancel/CancelToken.js +0 -57
  88. package/dependencies/src/axios-0.19.0/lib/core/Axios.js +0 -86
  89. package/dependencies/src/axios-0.19.0/lib/core/createError.js +0 -18
  90. package/dependencies/src/axios-0.19.0/lib/core/enhanceError.js +0 -42
  91. package/dependencies/src/axios-0.19.0/lib/core/mergeConfig.js +0 -51
  92. package/dependencies/src/axios-0.19.0/lib/defaults.js +0 -98
  93. package/dependencies/src/axios-0.19.0/lib/helpers/bind.js +0 -11
  94. package/dependencies/src/axios-0.19.0/lib/helpers/buildURL.js +0 -71
  95. package/dependencies/src/axios-0.19.0/lib/utils.js +0 -334
  96. package/dependencies/src/axios-0.19.0/package.json +0 -85
  97. package/dependencies/src/elliptic-6.5.1/lib/elliptic/curve/base.js +0 -374
  98. package/dependencies/src/elliptic-6.5.1/lib/elliptic/curve/mont.js +0 -178
  99. package/dependencies/src/elliptic-6.5.1/lib/elliptic/curves.js +0 -206
  100. package/dependencies/src/elliptic-6.5.1/lib/elliptic/ec/key.js +0 -118
  101. package/dependencies/src/elliptic-6.5.1/lib/elliptic/ec/signature.js +0 -134
  102. package/dependencies/src/elliptic-6.5.1/lib/elliptic/eddsa/index.js +0 -118
  103. package/dependencies/src/elliptic-6.5.1/lib/elliptic/eddsa/signature.js +0 -65
  104. package/dependencies/src/elliptic-6.5.1/lib/elliptic/utils.js +0 -120
  105. package/dependencies/src/elliptic-6.5.3/lib/elliptic/curve/edwards.js +0 -432
  106. package/dependencies/src/elliptic-6.5.3/lib/elliptic/curve/index.js +0 -8
  107. package/dependencies/src/elliptic-6.5.3/lib/elliptic/curve/short.js +0 -937
  108. package/dependencies/src/elliptic-6.5.3/lib/elliptic/ec/index.js +0 -241
  109. package/dependencies/src/elliptic-6.5.3/lib/elliptic/eddsa/key.js +0 -95
  110. package/dependencies/src/elliptic-6.5.3/lib/elliptic/precomputed/secp256k1.js +0 -780
  111. package/dependencies/src/elliptic-6.5.3/lib/elliptic.js +0 -13
  112. package/dependencies/src/elliptic-6.5.3/package.json +0 -55
  113. package/dependencies/src/follow-redirects-1.5.10/index.js +0 -322
  114. package/dependencies/src/is-buffer-2.0.3/index.js +0 -11
  115. /package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/index.js +0 -0
  116. /package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/cancel/isCancel.js +0 -0
  117. /package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/helpers/deprecatedMethod.js +0 -0
  118. /package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/helpers/normalizeHeaderName.js +0 -0
  119. /package/dependencies/src/{axios-0.19.0 → axios-0.33.0}/lib/helpers/spread.js +0 -0
  120. /package/dependencies/src/{elliptic-6.5.1 → elliptic-6.6.1}/lib/elliptic/curve/index.js +0 -0
  121. /package/dependencies/src/{elliptic-6.5.1 → elliptic-6.6.1}/lib/elliptic/eddsa/key.js +0 -0
  122. /package/dependencies/src/{elliptic-6.5.1 → elliptic-6.6.1}/lib/elliptic.js +0 -0
  123. /package/dependencies/src/{follow-redirects-1.5.10 → follow-redirects-1.16.0}/http.js +0 -0
  124. /package/dependencies/src/{follow-redirects-1.5.10 → follow-redirects-1.16.0}/https.js +0 -0
@@ -0,0 +1,565 @@
1
+ 'use strict';
2
+
3
+ var bind = require('./helpers/bind');
4
+
5
+ // utils is a library of generic helper functions non-specific to axios
6
+
7
+ var toString = Object.prototype.toString;
8
+
9
+ // eslint-disable-next-line func-names
10
+ var kindOf = (function(cache) {
11
+ // eslint-disable-next-line func-names
12
+ return function(thing) {
13
+ var str = toString.call(thing);
14
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
15
+ };
16
+ })(Object.create(null));
17
+
18
+ function kindOfTest(type) {
19
+ type = type.toLowerCase();
20
+ return function isKindOf(thing) {
21
+ return kindOf(thing) === type;
22
+ };
23
+ }
24
+
25
+ /**
26
+ * Determine if a value is an Array
27
+ *
28
+ * @param {Object} val The value to test
29
+ * @returns {boolean} True if value is an Array, otherwise false
30
+ */
31
+ function isArray(val) {
32
+ return Array.isArray(val);
33
+ }
34
+
35
+ /**
36
+ * Determine if a value is undefined
37
+ *
38
+ * @param {Object} val The value to test
39
+ * @returns {boolean} True if the value is undefined, otherwise false
40
+ */
41
+ function isUndefined(val) {
42
+ return typeof val === 'undefined';
43
+ }
44
+
45
+ /**
46
+ * Determine if a value is a Buffer
47
+ *
48
+ * @param {Object} val The value to test
49
+ * @returns {boolean} True if value is a Buffer, otherwise false
50
+ */
51
+ function isBuffer(val) {
52
+ return (
53
+ val !== null &&
54
+ !isUndefined(val) &&
55
+ val.constructor !== null &&
56
+ !isUndefined(val.constructor) &&
57
+ typeof val.constructor.isBuffer === 'function' &&
58
+ val.constructor.isBuffer(val)
59
+ );
60
+ }
61
+
62
+ /**
63
+ * Determine if a value is an ArrayBuffer
64
+ *
65
+ * @function
66
+ * @param {Object} val The value to test
67
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
68
+ */
69
+ var isArrayBuffer = kindOfTest('ArrayBuffer');
70
+
71
+ /**
72
+ * Determine if a value is a view on an ArrayBuffer
73
+ *
74
+ * @param {Object} val The value to test
75
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
76
+ */
77
+ function isArrayBufferView(val) {
78
+ var result;
79
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
80
+ result = ArrayBuffer.isView(val);
81
+ } else {
82
+ result = val && val.buffer && isArrayBuffer(val.buffer);
83
+ }
84
+ return result;
85
+ }
86
+
87
+ /**
88
+ * Determine if a value is a String
89
+ *
90
+ * @param {Object} val The value to test
91
+ * @returns {boolean} True if value is a String, otherwise false
92
+ */
93
+ function isString(val) {
94
+ return typeof val === 'string';
95
+ }
96
+
97
+ /**
98
+ * Determine if a value is a Number
99
+ *
100
+ * @param {Object} val The value to test
101
+ * @returns {boolean} True if value is a Number, otherwise false
102
+ */
103
+ function isNumber(val) {
104
+ return typeof val === 'number';
105
+ }
106
+
107
+ /**
108
+ * Determine if a value is an Object
109
+ *
110
+ * @param {Object} val The value to test
111
+ * @returns {boolean} True if value is an Object, otherwise false
112
+ */
113
+ function isObject(val) {
114
+ return val !== null && typeof val === 'object';
115
+ }
116
+
117
+ /**
118
+ * Determine if a value is a plain Object
119
+ *
120
+ * @param {Object} val The value to test
121
+ * @return {boolean} True if value is a plain Object, otherwise false
122
+ */
123
+ function isPlainObject(val) {
124
+ if (kindOf(val) !== 'object') {
125
+ return false;
126
+ }
127
+
128
+ var prototype = Object.getPrototypeOf(val);
129
+ return prototype === null || prototype === Object.prototype;
130
+ }
131
+
132
+ /**
133
+ * Determine if a value is a empty Object
134
+ *
135
+ * @param {Object} val The value to test
136
+ * @return {boolean} True if value is a empty Object, otherwise false
137
+ */
138
+ function isEmptyObject(val) {
139
+ if (!isPlainObject(val)) {
140
+ return false;
141
+ }
142
+ for (var key in val) {
143
+ if (Object.prototype.hasOwnProperty.call(val, key)) {
144
+ return false;
145
+ }
146
+ }
147
+ return true;
148
+ }
149
+
150
+ /**
151
+ * Determine if a value is a Date
152
+ *
153
+ * @function
154
+ * @param {Object} val The value to test
155
+ * @returns {boolean} True if value is a Date, otherwise false
156
+ */
157
+ var isDate = kindOfTest('Date');
158
+
159
+ /**
160
+ * Determine if a value is a File
161
+ *
162
+ * @function
163
+ * @param {Object} val The value to test
164
+ * @returns {boolean} True if value is a File, otherwise false
165
+ */
166
+ var isFile = kindOfTest('File');
167
+
168
+ /**
169
+ * Determine if a value is a Blob
170
+ *
171
+ * @function
172
+ * @param {Object} val The value to test
173
+ * @returns {boolean} True if value is a Blob, otherwise false
174
+ */
175
+ var isBlob = kindOfTest('Blob');
176
+
177
+ /**
178
+ * Determine if a value is a FileList
179
+ *
180
+ * @function
181
+ * @param {Object} val The value to test
182
+ * @returns {boolean} True if value is a File, otherwise false
183
+ */
184
+ var isFileList = kindOfTest('FileList');
185
+
186
+ /**
187
+ * Determine if a value is a Function
188
+ *
189
+ * @param {Object} val The value to test
190
+ * @returns {boolean} True if value is a Function, otherwise false
191
+ */
192
+ function isFunction(val) {
193
+ return toString.call(val) === '[object Function]';
194
+ }
195
+
196
+ /**
197
+ * Determine if a value is a Stream
198
+ *
199
+ * @param {Object} val The value to test
200
+ * @returns {boolean} True if value is a Stream, otherwise false
201
+ */
202
+ function isStream(val) {
203
+ return isObject(val) && isFunction(val.pipe);
204
+ }
205
+
206
+ /**
207
+ * Determine if a value is a FormData
208
+ *
209
+ * @param {Object} thing The value to test
210
+ * @returns {boolean} True if value is an FormData, otherwise false
211
+ */
212
+ function isFormData(thing) {
213
+ var pattern = '[object FormData]';
214
+ if (!thing) return false;
215
+ if (typeof FormData === 'function' && thing instanceof FormData) return true;
216
+ // Reject non-objects (strings, numbers, booleans) up front — Object.getPrototypeOf
217
+ // throws a TypeError on primitives in ES5 environments.
218
+ if (!isObject(thing)) return false;
219
+ // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.
220
+ var proto = Object.getPrototypeOf(thing);
221
+ if (!proto || proto === Object.prototype) return false;
222
+ if (!isFunction(thing.append)) return false;
223
+ return (
224
+ toString.call(thing) === pattern ||
225
+ (isFunction(thing.toString) && thing.toString() === pattern)
226
+ );
227
+ }
228
+
229
+ /**
230
+ * Determine if a value is a URLSearchParams object
231
+ * @function
232
+ * @param {Object} val The value to test
233
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
234
+ */
235
+ var isURLSearchParams = kindOfTest('URLSearchParams');
236
+
237
+ /**
238
+ * Trim excess whitespace off the beginning and end of a string
239
+ *
240
+ * @param {String} str The String to trim
241
+ * @returns {String} The String freed of excess whitespace
242
+ */
243
+ function trim(str) {
244
+ return str.trim
245
+ ? str.trim()
246
+ : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
247
+ }
248
+
249
+ /**
250
+ * Determine if we're running in a standard browser environment
251
+ *
252
+ * This allows axios to run in a web worker, and react-native.
253
+ * Both environments support XMLHttpRequest, but not fully standard globals.
254
+ *
255
+ * web workers:
256
+ * typeof window -> undefined
257
+ * typeof document -> undefined
258
+ *
259
+ * react-native:
260
+ * navigator.product -> 'ReactNative'
261
+ * nativescript
262
+ * navigator.product -> 'NativeScript' or 'NS'
263
+ */
264
+ function isStandardBrowserEnv() {
265
+ var product;
266
+ if (
267
+ typeof navigator !== 'undefined' &&
268
+ ((product = navigator.product) === 'ReactNative' ||
269
+ product === 'NativeScript' ||
270
+ product === 'NS')
271
+ ) {
272
+ return false;
273
+ }
274
+
275
+ return typeof window !== 'undefined' && typeof document !== 'undefined';
276
+ }
277
+
278
+ /**
279
+ * Iterate over an Array or an Object invoking a function for each item.
280
+ *
281
+ * If `obj` is an Array callback will be called passing
282
+ * the value, index, and complete array for each item.
283
+ *
284
+ * If 'obj' is an Object callback will be called passing
285
+ * the value, key, and complete object for each property.
286
+ *
287
+ * @param {Object|Array} obj The object to iterate
288
+ * @param {Function} fn The callback to invoke for each item
289
+ */
290
+ function forEach(obj, fn) {
291
+ // Don't bother if no value provided
292
+ if (obj === null || typeof obj === 'undefined') {
293
+ return;
294
+ }
295
+
296
+ // Force an array if not already something iterable
297
+ if (typeof obj !== 'object') {
298
+ /*eslint no-param-reassign:0*/
299
+ obj = [obj];
300
+ }
301
+
302
+ if (isArray(obj)) {
303
+ // Iterate over array values
304
+ for (var i = 0, l = obj.length; i < l; i++) {
305
+ fn.call(null, obj[i], i, obj);
306
+ }
307
+ } else {
308
+ // Iterate over object keys
309
+ for (var key in obj) {
310
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
311
+ fn.call(null, obj[key], key, obj);
312
+ }
313
+ }
314
+ }
315
+ }
316
+
317
+ /**
318
+ * Accepts varargs expecting each argument to be an object, then
319
+ * immutably merges the properties of each object and returns result.
320
+ *
321
+ * When multiple objects contain the same key the later object in
322
+ * the arguments list will take precedence.
323
+ *
324
+ * Example:
325
+ *
326
+ * ```js
327
+ * var result = merge({foo: 123}, {foo: 456});
328
+ * console.log(result.foo); // outputs 456
329
+ * ```
330
+ *
331
+ * @param {Object} obj1 Object to merge
332
+ * @returns {Object} Result of all merge properties
333
+ */
334
+ function merge(/* obj1, obj2, obj3, ... */) {
335
+ var result = Object.create(null);
336
+ function assignValue(val, key) {
337
+ var target;
338
+
339
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
340
+ return;
341
+ }
342
+
343
+ target = Object.prototype.hasOwnProperty.call(result, key)
344
+ ? result[key]
345
+ : undefined;
346
+
347
+ if (isPlainObject(target) && isPlainObject(val)) {
348
+ result[key] = merge(target, val);
349
+ } else if (isPlainObject(val)) {
350
+ result[key] = merge({}, val);
351
+ } else if (isArray(val)) {
352
+ result[key] = val.slice();
353
+ } else {
354
+ result[key] = val;
355
+ }
356
+ }
357
+
358
+ for (var i = 0, l = arguments.length; i < l; i++) {
359
+ forEach(arguments[i], assignValue);
360
+ }
361
+ return result;
362
+ }
363
+
364
+ /**
365
+ * Extends object a by mutably adding to it the properties of object b.
366
+ *
367
+ * @param {Object} a The object to be extended
368
+ * @param {Object} b The object to copy properties from
369
+ * @param {Object} thisArg The object to bind function to
370
+ * @return {Object} The resulting value of object a
371
+ */
372
+ function extend(a, b, thisArg) {
373
+ forEach(b, function assignValue(val, key) {
374
+ if (thisArg && typeof val === 'function') {
375
+ a[key] = bind(val, thisArg);
376
+ } else {
377
+ a[key] = val;
378
+ }
379
+ });
380
+ return a;
381
+ }
382
+
383
+ /**
384
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
385
+ *
386
+ * @param {string} content with BOM
387
+ * @return {string} content value without BOM
388
+ */
389
+ function stripBOM(content) {
390
+ if (content.charCodeAt(0) === 0xfeff) {
391
+ content = content.slice(1);
392
+ }
393
+ return content;
394
+ }
395
+
396
+ /**
397
+ * Inherit the prototype methods from one constructor into another
398
+ * @param {function} constructor
399
+ * @param {function} superConstructor
400
+ * @param {object} [props]
401
+ * @param {object} [descriptors]
402
+ */
403
+
404
+ function inherits(constructor, superConstructor, props, descriptors) {
405
+ constructor.prototype = Object.create(
406
+ superConstructor.prototype,
407
+ descriptors
408
+ );
409
+ constructor.prototype.constructor = constructor;
410
+ props && Object.assign(constructor.prototype, props);
411
+ }
412
+
413
+ /**
414
+ * Resolve object with deep prototype chain to a flat object
415
+ * @param {Object} sourceObj source object
416
+ * @param {Object} [destObj]
417
+ * @param {Function|Boolean} [filter]
418
+ * @param {Function} [propFilter]
419
+ * @returns {Object}
420
+ */
421
+
422
+ function toFlatObject(sourceObj, destObj, filter, propFilter) {
423
+ var props;
424
+ var i;
425
+ var prop;
426
+ var merged = {};
427
+
428
+ destObj = destObj || {};
429
+ // eslint-disable-next-line no-eq-null,eqeqeq
430
+ if (sourceObj == null) return destObj;
431
+
432
+ do {
433
+ props = Object.getOwnPropertyNames(sourceObj);
434
+ i = props.length;
435
+ while (i-- > 0) {
436
+ prop = props[i];
437
+ if (
438
+ (!propFilter || propFilter(prop, sourceObj, destObj)) &&
439
+ !merged[prop]
440
+ ) {
441
+ destObj[prop] = sourceObj[prop];
442
+ merged[prop] = true;
443
+ }
444
+ }
445
+ sourceObj = filter !== false && Object.getPrototypeOf(sourceObj);
446
+ } while (
447
+ sourceObj &&
448
+ (!filter || filter(sourceObj, destObj)) &&
449
+ sourceObj !== Object.prototype
450
+ );
451
+
452
+ return destObj;
453
+ }
454
+
455
+ /*
456
+ * determines whether a string ends with the characters of a specified string
457
+ * @param {String} str
458
+ * @param {String} searchString
459
+ * @param {Number} [position= 0]
460
+ * @returns {boolean}
461
+ */
462
+ function endsWith(str, searchString, position) {
463
+ str = String(str);
464
+ if (position === undefined || position > str.length) {
465
+ position = str.length;
466
+ }
467
+ position -= searchString.length;
468
+ var lastIndex = str.indexOf(searchString, position);
469
+ return lastIndex !== -1 && lastIndex === position;
470
+ }
471
+
472
+ /**
473
+ * Returns new array from array like object or null if failed
474
+ * @param {*} [thing]
475
+ * @returns {?Array}
476
+ */
477
+ function toArray(thing) {
478
+ if (!thing) return null;
479
+ if (isArray(thing)) return thing;
480
+ var i = thing.length;
481
+ if (!isNumber(i)) return null;
482
+ var arr = new Array(i);
483
+ while (i-- > 0) {
484
+ arr[i] = thing[i];
485
+ }
486
+ return arr;
487
+ }
488
+
489
+ // eslint-disable-next-line func-names
490
+ var isTypedArray = (function(TypedArray) {
491
+ // eslint-disable-next-line func-names
492
+ return function(thing) {
493
+ return TypedArray && thing instanceof TypedArray;
494
+ };
495
+ })(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
496
+
497
+ function forEachEntry(obj, fn) {
498
+ var generator = obj && obj[Symbol.iterator];
499
+
500
+ var iterator = generator.call(obj);
501
+
502
+ var result;
503
+
504
+ while ((result = iterator.next()) && !result.done) {
505
+ var pair = result.value;
506
+ fn.call(obj, pair[0], pair[1]);
507
+ }
508
+ }
509
+
510
+ function matchAll(regExp, str) {
511
+ var matches;
512
+ var arr = [];
513
+
514
+ while ((matches = regExp.exec(str)) !== null) {
515
+ arr.push(matches);
516
+ }
517
+
518
+ return arr;
519
+ }
520
+
521
+ var isHTMLForm = kindOfTest('HTMLFormElement');
522
+
523
+ var hasOwnProperty = (function resolver(_hasOwnProperty) {
524
+ return function(obj, prop) {
525
+ return _hasOwnProperty.call(obj, prop);
526
+ };
527
+ })(Object.prototype.hasOwnProperty);
528
+
529
+ module.exports = {
530
+ isArray: isArray,
531
+ isArrayBuffer: isArrayBuffer,
532
+ isBuffer: isBuffer,
533
+ isFormData: isFormData,
534
+ isArrayBufferView: isArrayBufferView,
535
+ isString: isString,
536
+ isNumber: isNumber,
537
+ isObject: isObject,
538
+ isPlainObject: isPlainObject,
539
+ isEmptyObject: isEmptyObject,
540
+ isUndefined: isUndefined,
541
+ isDate: isDate,
542
+ isFile: isFile,
543
+ isBlob: isBlob,
544
+ isFunction: isFunction,
545
+ isStream: isStream,
546
+ isURLSearchParams: isURLSearchParams,
547
+ isStandardBrowserEnv: isStandardBrowserEnv,
548
+ forEach: forEach,
549
+ merge: merge,
550
+ extend: extend,
551
+ trim: trim,
552
+ stripBOM: stripBOM,
553
+ inherits: inherits,
554
+ toFlatObject: toFlatObject,
555
+ kindOf: kindOf,
556
+ kindOfTest: kindOfTest,
557
+ endsWith: endsWith,
558
+ toArray: toArray,
559
+ isTypedArray: isTypedArray,
560
+ isFileList: isFileList,
561
+ forEachEntry: forEachEntry,
562
+ matchAll: matchAll,
563
+ isHTMLForm: isHTMLForm,
564
+ hasOwnProperty: hasOwnProperty
565
+ };
@@ -0,0 +1,100 @@
1
+ {
2
+ "name": "axios",
3
+ "version": "0.33.0",
4
+ "description": "Promise based HTTP client for the browser and node.js",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "scripts": {
8
+ "test": "node bin/ssl_hotfix.js grunt test && node bin/ssl_hotfix.js dtslint --localTs node_modules/typescript/lib",
9
+ "start": "node ./sandbox/server.js",
10
+ "preversion": "grunt version && npm test",
11
+ "build": "cross-env NODE_ENV=production grunt build",
12
+ "examples": "node ./examples/server.js",
13
+ "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
14
+ "fix": "eslint --fix lib/**/*.js"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/axios/axios.git"
19
+ },
20
+ "keywords": [
21
+ "xhr",
22
+ "http",
23
+ "ajax",
24
+ "promise",
25
+ "node"
26
+ ],
27
+ "author": "Matt Zabriskie",
28
+ "license": "MIT",
29
+ "bugs": {
30
+ "url": "https://github.com/axios/axios/issues"
31
+ },
32
+ "homepage": "https://axios-http.com",
33
+ "devDependencies": {
34
+ "@rollup/plugin-babel": "^5.3.0",
35
+ "@rollup/plugin-commonjs": "^15.1.0",
36
+ "@rollup/plugin-json": "^4.1.0",
37
+ "@rollup/plugin-multi-entry": "^4.0.0",
38
+ "@rollup/plugin-node-resolve": "^9.0.0",
39
+ "abortcontroller-polyfill": "^1.7.3",
40
+ "body-parser": "^1.20.0",
41
+ "coveralls": "^3.1.1",
42
+ "cross-env": "^7.0.3",
43
+ "dtslint": "4.2.1",
44
+ "es6-promise": "^4.2.8",
45
+ "express": "^4.18.1",
46
+ "formidable": "^2.0.1",
47
+ "grunt": "^1.4.1",
48
+ "grunt-banner": "^0.6.0",
49
+ "grunt-cli": "^1.4.3",
50
+ "grunt-contrib-clean": "^2.0.0",
51
+ "grunt-contrib-watch": "^1.1.0",
52
+ "grunt-eslint": "^24.0.0",
53
+ "grunt-karma": "^4.0.2",
54
+ "grunt-mocha-test": "^0.13.3",
55
+ "grunt-shell": "^3.0.1",
56
+ "grunt-webpack": "^5.0.0",
57
+ "istanbul-instrumenter-loader": "^3.0.1",
58
+ "jasmine-core": "^2.4.1",
59
+ "karma": "^6.3.17",
60
+ "karma-chrome-launcher": "^3.1.1",
61
+ "karma-firefox-launcher": "^2.1.2",
62
+ "karma-jasmine": "^1.1.1",
63
+ "karma-jasmine-ajax": "^0.1.13",
64
+ "karma-safari-launcher": "^1.0.0",
65
+ "karma-sauce-launcher": "^4.3.6",
66
+ "karma-sinon": "^1.0.5",
67
+ "karma-sourcemap-loader": "^0.3.8",
68
+ "karma-webpack": "^4.0.2",
69
+ "load-grunt-tasks": "^5.1.0",
70
+ "minimist": "^1.2.6",
71
+ "mocha": "^8.2.1",
72
+ "multer": "^1.4.4",
73
+ "rollup": "^2.67.0",
74
+ "rollup-plugin-terser": "^7.0.2",
75
+ "sinon": "^4.5.0",
76
+ "terser-webpack-plugin": "^4.2.3",
77
+ "typescript": "^4.6.3",
78
+ "url-search-params": "^0.10.0",
79
+ "webpack": "^4.44.2",
80
+ "webpack-dev-server": "^3.11.0"
81
+ },
82
+ "browser": {
83
+ "./lib/adapters/http.js": "./lib/adapters/xhr.js",
84
+ "./lib/platform/node/index.js": "./lib/platform/browser/index.js"
85
+ },
86
+ "jsdelivr": "dist/axios.min.js",
87
+ "unpkg": "dist/axios.min.js",
88
+ "typings": "./index.d.ts",
89
+ "dependencies": {
90
+ "follow-redirects": "^1.15.4",
91
+ "form-data": "^4.0.4",
92
+ "proxy-from-env": "^1.1.0"
93
+ },
94
+ "bundlesize": [
95
+ {
96
+ "path": "./dist/axios.min.js",
97
+ "threshold": "5kB"
98
+ }
99
+ ]
100
+ }
@@ -2972,7 +2972,13 @@
2972
2972
  } else if (cmp > 0) {
2973
2973
  r.isub(this.p);
2974
2974
  } else {
2975
- r.strip();
2975
+ if (r.strip !== undefined) {
2976
+ // r is BN v4 instance
2977
+ r.strip();
2978
+ } else {
2979
+ // r is BN v5 instance
2980
+ r._strip();
2981
+ }
2976
2982
  }
2977
2983
 
2978
2984
  return r;