extra-request 3.0.1 → 3.0.2
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/CHANGELOG.md +231 -0
- package/dist/es2015/index.min.mjs +2 -2
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +43 -24
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +45 -26
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -2
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +2 -2
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +43 -24
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +45 -26
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -2
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/package.json +18 -19
package/dist/es2018/index.umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ExtraRequest = {}));
|
|
5
|
-
}(this, (function (exports) { 'use strict';
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
8
|
|
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
abortController_browser.AbortController = void 0;
|
|
39
39
|
abortController_browser.AbortController = globalThis.AbortController;
|
|
40
40
|
|
|
41
|
+
var abortError_browser = {};
|
|
42
|
+
|
|
43
|
+
abortError_browser.AbortError = void 0;
|
|
44
|
+
abortError_browser.AbortError = globalThis.DOMException;
|
|
45
|
+
|
|
41
46
|
var blob_browser = {};
|
|
42
47
|
|
|
43
48
|
blob_browser.Blob = void 0;
|
|
@@ -64,6 +69,7 @@
|
|
|
64
69
|
__exportStar(response_browser, exports);
|
|
65
70
|
__exportStar(formData_browser, exports);
|
|
66
71
|
__exportStar(abortController_browser, exports);
|
|
72
|
+
__exportStar(abortError_browser, exports);
|
|
67
73
|
__exportStar(blob_browser, exports);
|
|
68
74
|
__exportStar(eventSource_browser, exports);
|
|
69
75
|
|
|
@@ -121,8 +127,8 @@
|
|
|
121
127
|
const null_1$1 = _null;
|
|
122
128
|
const undefined_1$2 = _undefined;
|
|
123
129
|
function isAsyncIterable(val) {
|
|
124
|
-
return null_1$1.isntNull(val)
|
|
125
|
-
&& undefined_1$2.isntUndefined(val)
|
|
130
|
+
return (0, null_1$1.isntNull)(val)
|
|
131
|
+
&& (0, undefined_1$2.isntUndefined)(val)
|
|
126
132
|
&& typeof val[Symbol.asyncIterator] === 'function';
|
|
127
133
|
}
|
|
128
134
|
asyncIterable.isAsyncIterable = isAsyncIterable;
|
|
@@ -172,7 +178,7 @@
|
|
|
172
178
|
char.isntChar = char.isChar = void 0;
|
|
173
179
|
const string_1$1 = string;
|
|
174
180
|
function isChar(val) {
|
|
175
|
-
return string_1$1.isString(val)
|
|
181
|
+
return (0, string_1$1.isString)(val)
|
|
176
182
|
&& val.length === 1;
|
|
177
183
|
}
|
|
178
184
|
char.isChar = isChar;
|
|
@@ -201,6 +207,18 @@
|
|
|
201
207
|
}
|
|
202
208
|
_enum.inEnum = inEnum;
|
|
203
209
|
|
|
210
|
+
var error = {};
|
|
211
|
+
|
|
212
|
+
error.isntError = error.isError = void 0;
|
|
213
|
+
function isError(val) {
|
|
214
|
+
return val instanceof Error;
|
|
215
|
+
}
|
|
216
|
+
error.isError = isError;
|
|
217
|
+
function isntError(val) {
|
|
218
|
+
return !isError(val);
|
|
219
|
+
}
|
|
220
|
+
error.isntError = isntError;
|
|
221
|
+
|
|
204
222
|
var falsy = {};
|
|
205
223
|
|
|
206
224
|
falsy.isntFalsy = falsy.isFalsy = void 0;
|
|
@@ -231,8 +249,8 @@
|
|
|
231
249
|
const null_1 = _null;
|
|
232
250
|
const undefined_1$1 = _undefined;
|
|
233
251
|
function isIterable(val) {
|
|
234
|
-
return null_1.isntNull(val)
|
|
235
|
-
&& undefined_1$1.isntUndefined(val)
|
|
252
|
+
return (0, null_1.isntNull)(val)
|
|
253
|
+
&& (0, undefined_1$1.isntUndefined)(val)
|
|
236
254
|
&& typeof val[Symbol.iterator] === 'function';
|
|
237
255
|
}
|
|
238
256
|
iterable.isIterable = isIterable;
|
|
@@ -286,16 +304,16 @@
|
|
|
286
304
|
const number_1 = number;
|
|
287
305
|
const undefined_1 = _undefined;
|
|
288
306
|
function isJsonRpcId(val) {
|
|
289
|
-
return string_1.isString(val) || number_1.isNumber(val);
|
|
307
|
+
return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
|
|
290
308
|
}
|
|
291
309
|
function isJsonRpcParams(val) {
|
|
292
|
-
return array_1.isArray(val) || object_1.isObject(val);
|
|
310
|
+
return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
|
|
293
311
|
}
|
|
294
312
|
function isJsonRpcNotification(val) {
|
|
295
|
-
return object_1.isRecord(val)
|
|
296
|
-
&& string_1.isString(val.jsonrpc)
|
|
297
|
-
&& string_1.isString(val.method)
|
|
298
|
-
&& undefined_1.isUndefined(val.id)
|
|
313
|
+
return (0, object_1.isRecord)(val)
|
|
314
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
315
|
+
&& (0, string_1.isString)(val.method)
|
|
316
|
+
&& (0, undefined_1.isUndefined)(val.id)
|
|
299
317
|
&& isJsonRpcParams(val.params);
|
|
300
318
|
}
|
|
301
319
|
jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
|
|
@@ -304,9 +322,9 @@
|
|
|
304
322
|
}
|
|
305
323
|
jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
|
|
306
324
|
function isJsonRpcRequest(val) {
|
|
307
|
-
return object_1.isRecord(val)
|
|
308
|
-
&& string_1.isString(val.jsonrpc)
|
|
309
|
-
&& string_1.isString(val.method)
|
|
325
|
+
return (0, object_1.isRecord)(val)
|
|
326
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
327
|
+
&& (0, string_1.isString)(val.method)
|
|
310
328
|
&& isJsonRpcId(val.id)
|
|
311
329
|
&& isJsonRpcParams(val.params);
|
|
312
330
|
}
|
|
@@ -316,10 +334,10 @@
|
|
|
316
334
|
}
|
|
317
335
|
jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
|
|
318
336
|
function isJsonRpcSuccess(val) {
|
|
319
|
-
return object_1.isRecord(val)
|
|
320
|
-
&& string_1.isString(val.jsonrpc)
|
|
321
|
-
&& string_1.isString(val.id)
|
|
322
|
-
&& undefined_1.isntUndefined(val.result);
|
|
337
|
+
return (0, object_1.isRecord)(val)
|
|
338
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
339
|
+
&& (0, string_1.isString)(val.id)
|
|
340
|
+
&& (0, undefined_1.isntUndefined)(val.result);
|
|
323
341
|
}
|
|
324
342
|
jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
|
|
325
343
|
function isntJsonRpcSuccess(val) {
|
|
@@ -327,8 +345,8 @@
|
|
|
327
345
|
}
|
|
328
346
|
jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
|
|
329
347
|
function isJsonRpcError(val) {
|
|
330
|
-
return object_1.isRecord(val)
|
|
331
|
-
&& string_1.isString(val.jsonrpc)
|
|
348
|
+
return (0, object_1.isRecord)(val)
|
|
349
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
332
350
|
&& isJsonRpcId(val.id)
|
|
333
351
|
&& isJsonRpcErrorObject(val.error);
|
|
334
352
|
}
|
|
@@ -338,10 +356,10 @@
|
|
|
338
356
|
}
|
|
339
357
|
jsonRpc.isntJsonRpcError = isntJsonRpcError;
|
|
340
358
|
function isJsonRpcErrorObject(val) {
|
|
341
|
-
return object_1.isRecord(val)
|
|
342
|
-
&& number_1.isNumber(val.code)
|
|
343
|
-
&& string_1.isString(val.message)
|
|
344
|
-
&& (undefined_1.isUndefined(val.data) || object_1.isObject(val.data));
|
|
359
|
+
return (0, object_1.isRecord)(val)
|
|
360
|
+
&& (0, number_1.isNumber)(val.code)
|
|
361
|
+
&& (0, string_1.isString)(val.message)
|
|
362
|
+
&& ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
|
|
345
363
|
}
|
|
346
364
|
|
|
347
365
|
var json$1 = {};
|
|
@@ -393,6 +411,7 @@
|
|
|
393
411
|
__exportStar(char, exports);
|
|
394
412
|
__exportStar(date, exports);
|
|
395
413
|
__exportStar(_enum, exports);
|
|
414
|
+
__exportStar(error, exports);
|
|
396
415
|
__exportStar(falsy, exports);
|
|
397
416
|
__exportStar(_function, exports);
|
|
398
417
|
__exportStar(iterable, exports);
|
|
@@ -843,5 +862,5 @@
|
|
|
843
862
|
|
|
844
863
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
845
864
|
|
|
846
|
-
}))
|
|
865
|
+
}));
|
|
847
866
|
//# sourceMappingURL=index.umd.js.map
|