@gcmdev/faxios 0.1.0 → 0.2.1

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 (210) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +40 -1774
  3. package/dist/index.d.ts +9 -6
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/adapters/fetch-helpers.d.ts +1 -0
  7. package/dist/lib/adapters/fetch-helpers.d.ts.map +1 -0
  8. package/dist/lib/adapters/fetch.d.ts +1 -0
  9. package/dist/lib/adapters/fetch.d.ts.map +1 -0
  10. package/dist/lib/adapters/fetch.js +23 -3
  11. package/dist/lib/adapters/fetch.js.map +1 -1
  12. package/dist/lib/cancel/CanceledError.d.ts +1 -0
  13. package/dist/lib/cancel/CanceledError.d.ts.map +1 -0
  14. package/dist/lib/cancel/isCancel.d.ts +3 -1
  15. package/dist/lib/cancel/isCancel.d.ts.map +1 -0
  16. package/dist/lib/cancel/isCancel.js +3 -0
  17. package/dist/lib/cancel/isCancel.js.map +1 -1
  18. package/dist/lib/core/Faxios.d.ts +6 -17
  19. package/dist/lib/core/Faxios.d.ts.map +1 -0
  20. package/dist/lib/core/Faxios.js +144 -76
  21. package/dist/lib/core/Faxios.js.map +1 -1
  22. package/dist/lib/core/FaxiosError.d.ts +19 -6
  23. package/dist/lib/core/FaxiosError.d.ts.map +1 -0
  24. package/dist/lib/core/FaxiosError.js +16 -1
  25. package/dist/lib/core/FaxiosError.js.map +1 -1
  26. package/dist/lib/core/FaxiosHeaders.d.ts +12 -8
  27. package/dist/lib/core/FaxiosHeaders.d.ts.map +1 -0
  28. package/dist/lib/core/FaxiosHeaders.js +1 -0
  29. package/dist/lib/core/FaxiosHeaders.js.map +1 -1
  30. package/dist/lib/core/buildFullPath.d.ts +1 -0
  31. package/dist/lib/core/buildFullPath.d.ts.map +1 -0
  32. package/dist/lib/core/define.d.ts +19 -2
  33. package/dist/lib/core/define.d.ts.map +1 -0
  34. package/dist/lib/core/define.js.map +1 -1
  35. package/dist/lib/core/dispatchRequest.d.ts +1 -0
  36. package/dist/lib/core/dispatchRequest.d.ts.map +1 -0
  37. package/dist/lib/core/dispatchRequest.js +4 -0
  38. package/dist/lib/core/dispatchRequest.js.map +1 -1
  39. package/dist/lib/core/mergeConfig.d.ts +1 -0
  40. package/dist/lib/core/mergeConfig.d.ts.map +1 -0
  41. package/dist/lib/core/prepareRequest.d.ts +1 -0
  42. package/dist/lib/core/prepareRequest.d.ts.map +1 -0
  43. package/dist/lib/core/prepareRequest.js +1 -20
  44. package/dist/lib/core/prepareRequest.js.map +1 -1
  45. package/dist/lib/core/route.d.ts +11 -2
  46. package/dist/lib/core/route.d.ts.map +1 -0
  47. package/dist/lib/core/route.js.map +1 -1
  48. package/dist/lib/core/settle.d.ts +1 -0
  49. package/dist/lib/core/settle.d.ts.map +1 -0
  50. package/dist/lib/core/transformData.d.ts +1 -0
  51. package/dist/lib/core/transformData.d.ts.map +1 -0
  52. package/dist/lib/core/validateSchema.d.ts +1 -0
  53. package/dist/lib/core/validateSchema.d.ts.map +1 -0
  54. package/dist/lib/defaults/index.d.ts +1 -0
  55. package/dist/lib/defaults/index.d.ts.map +1 -0
  56. package/dist/lib/defaults/index.js +3 -3
  57. package/dist/lib/defaults/index.js.map +1 -1
  58. package/dist/lib/defaults/transitional.d.ts +1 -1
  59. package/dist/lib/defaults/transitional.d.ts.map +1 -0
  60. package/dist/lib/defaults/transitional.js +0 -1
  61. package/dist/lib/defaults/transitional.js.map +1 -1
  62. package/dist/lib/env/data.d.ts +2 -1
  63. package/dist/lib/env/data.d.ts.map +1 -0
  64. package/dist/lib/env/data.js +1 -1
  65. package/dist/lib/env/data.js.map +1 -1
  66. package/dist/lib/faxios.d.ts +115 -48
  67. package/dist/lib/faxios.d.ts.map +1 -0
  68. package/dist/lib/faxios.js +14 -2
  69. package/dist/lib/faxios.js.map +1 -1
  70. package/dist/lib/helpers/FaxiosURLSearchParams.d.ts +3 -1
  71. package/dist/lib/helpers/FaxiosURLSearchParams.d.ts.map +1 -0
  72. package/dist/lib/helpers/FaxiosURLSearchParams.js.map +1 -1
  73. package/dist/lib/helpers/HttpStatusCode.d.ts +1 -0
  74. package/dist/lib/helpers/HttpStatusCode.d.ts.map +1 -0
  75. package/dist/lib/helpers/buildURL.d.ts +1 -0
  76. package/dist/lib/helpers/buildURL.d.ts.map +1 -0
  77. package/dist/lib/helpers/buildURL.js +7 -1
  78. package/dist/lib/helpers/buildURL.js.map +1 -1
  79. package/dist/lib/helpers/cloneConfig.d.ts +4 -0
  80. package/dist/lib/helpers/cloneConfig.d.ts.map +1 -0
  81. package/dist/lib/helpers/cloneConfig.js +21 -0
  82. package/dist/lib/helpers/cloneConfig.js.map +1 -0
  83. package/dist/lib/helpers/combineURLs.d.ts +1 -0
  84. package/dist/lib/helpers/combineURLs.d.ts.map +1 -0
  85. package/dist/lib/helpers/composeSignals.d.ts +1 -0
  86. package/dist/lib/helpers/composeSignals.d.ts.map +1 -0
  87. package/dist/lib/helpers/composeSignals.js +8 -1
  88. package/dist/lib/helpers/composeSignals.js.map +1 -1
  89. package/dist/lib/helpers/cookies.d.ts +1 -0
  90. package/dist/lib/helpers/cookies.d.ts.map +1 -0
  91. package/dist/lib/helpers/estimateDataURLDecodedBytes.d.ts +1 -0
  92. package/dist/lib/helpers/estimateDataURLDecodedBytes.d.ts.map +1 -0
  93. package/dist/lib/helpers/formDataToJSON.d.ts +1 -0
  94. package/dist/lib/helpers/formDataToJSON.d.ts.map +1 -0
  95. package/dist/lib/helpers/isAbsoluteURL.d.ts +1 -0
  96. package/dist/lib/helpers/isAbsoluteURL.d.ts.map +1 -0
  97. package/dist/lib/helpers/isFaxiosError.d.ts +8 -2
  98. package/dist/lib/helpers/isFaxiosError.d.ts.map +1 -0
  99. package/dist/lib/helpers/isFaxiosError.js +5 -1
  100. package/dist/lib/helpers/isFaxiosError.js.map +1 -1
  101. package/dist/lib/helpers/isURLSameOrigin.d.ts +1 -0
  102. package/dist/lib/helpers/isURLSameOrigin.d.ts.map +1 -0
  103. package/dist/lib/helpers/parseHeaders.d.ts +1 -0
  104. package/dist/lib/helpers/parseHeaders.d.ts.map +1 -0
  105. package/dist/lib/helpers/progressEventReducer.d.ts +1 -0
  106. package/dist/lib/helpers/progressEventReducer.d.ts.map +1 -0
  107. package/dist/lib/helpers/sanitizeHeaderValue.d.ts +1 -0
  108. package/dist/lib/helpers/sanitizeHeaderValue.d.ts.map +1 -0
  109. package/dist/lib/helpers/speedometer.d.ts +1 -0
  110. package/dist/lib/helpers/speedometer.d.ts.map +1 -0
  111. package/dist/lib/helpers/substitutePathParams.d.ts +1 -0
  112. package/dist/lib/helpers/substitutePathParams.d.ts.map +1 -0
  113. package/dist/lib/helpers/throttle.d.ts +1 -0
  114. package/dist/lib/helpers/throttle.d.ts.map +1 -0
  115. package/dist/lib/helpers/toFormData.d.ts +1 -0
  116. package/dist/lib/helpers/toFormData.d.ts.map +1 -0
  117. package/dist/lib/helpers/toURLEncodedForm.d.ts +1 -0
  118. package/dist/lib/helpers/toURLEncodedForm.d.ts.map +1 -0
  119. package/dist/lib/helpers/trackStream.d.ts +1 -0
  120. package/dist/lib/helpers/trackStream.d.ts.map +1 -0
  121. package/dist/lib/helpers/validator.d.ts +1 -0
  122. package/dist/lib/helpers/validator.d.ts.map +1 -0
  123. package/dist/lib/platform.d.ts +2 -1
  124. package/dist/lib/platform.d.ts.map +1 -0
  125. package/dist/lib/plugins/attempt.d.ts +2 -0
  126. package/dist/lib/plugins/attempt.d.ts.map +1 -0
  127. package/dist/lib/plugins/attempt.js +4 -0
  128. package/dist/lib/plugins/attempt.js.map +1 -0
  129. package/dist/lib/plugins/authBearer.d.ts +31 -0
  130. package/dist/lib/plugins/authBearer.d.ts.map +1 -0
  131. package/dist/lib/plugins/authBearer.js +99 -0
  132. package/dist/lib/plugins/authBearer.js.map +1 -0
  133. package/dist/lib/plugins/definePlugin.d.ts +22 -0
  134. package/dist/lib/plugins/definePlugin.d.ts.map +1 -0
  135. package/dist/lib/plugins/definePlugin.js +14 -0
  136. package/dist/lib/plugins/definePlugin.js.map +1 -0
  137. package/dist/lib/plugins/retry.d.ts +66 -0
  138. package/dist/lib/plugins/retry.d.ts.map +1 -0
  139. package/dist/lib/plugins/retry.js +168 -0
  140. package/dist/lib/plugins/retry.js.map +1 -0
  141. package/dist/lib/plugins/timing.d.ts +32 -0
  142. package/dist/lib/plugins/timing.d.ts.map +1 -0
  143. package/dist/lib/plugins/timing.js +53 -0
  144. package/dist/lib/plugins/timing.js.map +1 -0
  145. package/dist/lib/types/standard-schema.d.ts +1 -0
  146. package/dist/lib/types/standard-schema.d.ts.map +1 -0
  147. package/dist/lib/types.d.ts +125 -34
  148. package/dist/lib/types.d.ts.map +1 -0
  149. package/dist/lib/utils.d.ts +1 -0
  150. package/dist/lib/utils.d.ts.map +1 -0
  151. package/package.json +42 -19
  152. package/skills/configure-requests/SKILL.md +380 -0
  153. package/skills/configure-requests/references/axios-differences.md +67 -0
  154. package/skills/configure-requests/references/plugins.md +127 -0
  155. package/src/index.ts +57 -0
  156. package/src/lib/adapters/fetch-helpers.ts +167 -0
  157. package/src/lib/adapters/fetch.ts +810 -0
  158. package/src/lib/cancel/CanceledError.ts +23 -0
  159. package/src/lib/cancel/isCancel.ts +10 -0
  160. package/src/lib/core/Faxios.ts +513 -0
  161. package/src/lib/core/FaxiosError.ts +283 -0
  162. package/src/lib/core/FaxiosHeaders.ts +529 -0
  163. package/src/lib/core/buildFullPath.ts +51 -0
  164. package/src/lib/core/define.ts +127 -0
  165. package/src/lib/core/dispatchRequest.ts +171 -0
  166. package/src/lib/core/mergeConfig.ts +175 -0
  167. package/src/lib/core/prepareRequest.ts +155 -0
  168. package/src/lib/core/route.ts +68 -0
  169. package/src/lib/core/settle.ts +20 -0
  170. package/src/lib/core/transformData.ts +23 -0
  171. package/src/lib/core/validateSchema.ts +53 -0
  172. package/src/lib/defaults/index.ts +221 -0
  173. package/src/lib/defaults/transitional.ts +9 -0
  174. package/src/lib/env/data.ts +1 -0
  175. package/src/lib/faxios.ts +306 -0
  176. package/src/lib/helpers/FaxiosURLSearchParams.ts +52 -0
  177. package/src/lib/helpers/HttpStatusCode.ts +77 -0
  178. package/src/lib/helpers/buildURL.ts +77 -0
  179. package/src/lib/helpers/cloneConfig.ts +23 -0
  180. package/src/lib/helpers/combineURLs.ts +11 -0
  181. package/src/lib/helpers/composeSignals.ts +74 -0
  182. package/src/lib/helpers/cookies.ts +68 -0
  183. package/src/lib/helpers/deprecatedMethod.ts +32 -0
  184. package/src/lib/helpers/estimateDataURLDecodedBytes.ts +95 -0
  185. package/src/lib/helpers/formDataToJSON.ts +122 -0
  186. package/src/lib/helpers/isAbsoluteURL.ts +13 -0
  187. package/src/lib/helpers/isFaxiosError.ts +19 -0
  188. package/src/lib/helpers/isURLSameOrigin.ts +16 -0
  189. package/src/lib/helpers/parseHeaders.ts +76 -0
  190. package/src/lib/helpers/progressEventReducer.ts +57 -0
  191. package/src/lib/helpers/sanitizeHeaderValue.ts +61 -0
  192. package/src/lib/helpers/speedometer.ts +55 -0
  193. package/src/lib/helpers/substitutePathParams.ts +13 -0
  194. package/src/lib/helpers/throttle.ts +45 -0
  195. package/src/lib/helpers/toFormData.ts +296 -0
  196. package/src/lib/helpers/toURLEncodedForm.ts +14 -0
  197. package/src/lib/helpers/trackStream.ts +123 -0
  198. package/src/lib/helpers/validator.ts +114 -0
  199. package/src/lib/platform.ts +44 -0
  200. package/src/lib/plugins/attempt.ts +3 -0
  201. package/src/lib/plugins/authBearer.ts +124 -0
  202. package/src/lib/plugins/definePlugin.ts +34 -0
  203. package/src/lib/plugins/retry.ts +245 -0
  204. package/src/lib/plugins/timing.ts +76 -0
  205. package/src/lib/types/standard-schema.ts +58 -0
  206. package/src/lib/types.ts +496 -0
  207. package/src/lib/utils.ts +932 -0
  208. package/dist/lib/core/InterceptorManager.d.ts +0 -9
  209. package/dist/lib/core/InterceptorManager.js +0 -28
  210. package/dist/lib/core/InterceptorManager.js.map +0 -1
@@ -0,0 +1,932 @@
1
+ "use strict";
2
+
3
+ // utils is a library of generic helper functions non-specific to faxios
4
+
5
+ const { toString } = Object.prototype;
6
+ const { getPrototypeOf } = Object;
7
+ const { iterator, toStringTag } = Symbol;
8
+
9
+ const hasOwnProperty = (obj: unknown, prop: PropertyKey) => Object.hasOwn(obj as object, prop);
10
+
11
+ /**
12
+ * Walk the prototype chain (excluding the shared Object.prototype) looking for
13
+ * an own `prop`. This distinguishes genuine own/inherited members — including
14
+ * class accessors and template prototypes — from members injected via
15
+ * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
16
+ * live on Object.prototype itself and are therefore never matched.
17
+ *
18
+ * @param {*} thing The value whose chain to inspect
19
+ * @param {string|symbol} prop The property key to look for
20
+ *
21
+ * @returns {boolean} True when `prop` is owned below Object.prototype
22
+ */
23
+ const hasOwnInPrototypeChain = (thing: unknown, prop: PropertyKey): boolean => {
24
+ let obj: object | null = thing != null && typeof thing === "object" ? thing : null;
25
+ if (obj === null) return false;
26
+ const seen: Array<object> = [];
27
+
28
+ while (obj != null && obj !== Object.prototype) {
29
+ if (seen.indexOf(obj) !== -1) {
30
+ return false;
31
+ }
32
+ seen.push(obj);
33
+
34
+ if (hasOwnProperty(obj, prop)) {
35
+ return true;
36
+ }
37
+ obj = getPrototypeOf(obj) as object | null;
38
+ }
39
+ return false;
40
+ };
41
+
42
+ /**
43
+ * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
44
+ * properties and members inherited from a non-Object.prototype source (a class
45
+ * instance or template object) are honored; a value reachable only through a
46
+ * polluted Object.prototype is ignored and `undefined` is returned.
47
+ *
48
+ * @param {*} obj The source object
49
+ * @param {string|symbol} prop The property key to read
50
+ *
51
+ * @returns {*} The resolved value, or undefined when unsafe/absent
52
+ */
53
+ const getSafeProp = (obj: unknown, prop: PropertyKey): unknown =>
54
+ obj != null && hasOwnInPrototypeChain(obj, prop) ? (obj as Record<PropertyKey, unknown>)[prop] : undefined;
55
+
56
+ const kindOf = (cache => (thing: unknown) => {
57
+ const str = toString.call(thing);
58
+ return (cache as Record<string, string>)[str] || ((cache as Record<string, string>)[str] = str.slice(8, -1).toLowerCase());
59
+ })(Object.create(null) as object);
60
+
61
+ const kindOfTest = (type: string) => {
62
+ type = type.toLowerCase();
63
+ return (thing: unknown) => kindOf(thing) === type;
64
+ };
65
+
66
+ const typeOfTest = (type: string) => (thing: unknown) => typeof thing === type;
67
+
68
+ /**
69
+ * Determine if a value is a non-null object
70
+ *
71
+ * @param {Object} val The value to test
72
+ *
73
+ * @returns {boolean} True if value is an Array, otherwise false
74
+ */
75
+ const { isArray } = Array;
76
+
77
+ /**
78
+ * Determine if a value is undefined
79
+ *
80
+ * @param {*} val The value to test
81
+ *
82
+ * @returns {boolean} True if the value is undefined, otherwise false
83
+ */
84
+ const isUndefined = typeOfTest("undefined");
85
+
86
+ /**
87
+ * Determine if a value is a Buffer
88
+ *
89
+ * @param {*} val The value to test
90
+ *
91
+ * @returns {boolean} True if value is a Buffer, otherwise false
92
+ */
93
+ function isBuffer(val: unknown): boolean {
94
+ return (
95
+ val !== null &&
96
+ !isUndefined(val) &&
97
+ !isUndefined((val as Record<string, unknown>).constructor) &&
98
+ isFunction((val as { constructor: Record<string, unknown>; }).constructor["isBuffer"]) &&
99
+ (val as { constructor: { isBuffer: (v: unknown) => boolean; }; }).constructor.isBuffer(val)
100
+ );
101
+ }
102
+
103
+ /**
104
+ * Determine if a value is an ArrayBuffer
105
+ *
106
+ * @param {*} val The value to test
107
+ *
108
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
109
+ */
110
+ const isArrayBuffer = kindOfTest("ArrayBuffer");
111
+
112
+ /**
113
+ * Determine if a value is a view on an ArrayBuffer
114
+ *
115
+ * @param {*} val The value to test
116
+ *
117
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
118
+ */
119
+ function isArrayBufferView(val: unknown): boolean {
120
+ let result;
121
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
122
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
123
+ result = ArrayBuffer.isView(val);
124
+ }
125
+ else {
126
+ result = val && (val as Record<string, unknown>).buffer && isArrayBuffer((val as Record<string, unknown>).buffer);
127
+ }
128
+ return !!result;
129
+ }
130
+
131
+ /**
132
+ * Determine if a value is a String
133
+ *
134
+ * @param {*} val The value to test
135
+ *
136
+ * @returns {boolean} True if value is a String, otherwise false
137
+ */
138
+ const isString = typeOfTest("string");
139
+
140
+ /**
141
+ * Determine if a value is a Function
142
+ *
143
+ * @param {*} val The value to test
144
+ * @returns {boolean} True if value is a Function, otherwise false
145
+ */
146
+ const isFunction = typeOfTest("function");
147
+
148
+ /**
149
+ * Determine if a value is a Number
150
+ *
151
+ * @param {*} val The value to test
152
+ *
153
+ * @returns {boolean} True if value is a Number, otherwise false
154
+ */
155
+ const isNumber = typeOfTest("number");
156
+
157
+ /**
158
+ * Determine if a value is an Object
159
+ *
160
+ * @param {*} thing The value to test
161
+ *
162
+ * @returns {boolean} True if value is an Object, otherwise false
163
+ */
164
+ const isObject = (thing: unknown): thing is object => thing !== null && typeof thing === "object";
165
+
166
+ /**
167
+ * Determine if a value is a Boolean
168
+ *
169
+ * @param {*} thing The value to test
170
+ * @returns {boolean} True if value is a Boolean, otherwise false
171
+ */
172
+ const isBoolean = (thing: unknown) => thing === true || thing === false;
173
+
174
+ /**
175
+ * Determine if a value is a plain Object
176
+ *
177
+ * @param {*} val The value to test
178
+ *
179
+ * @returns {boolean} True if value is a plain Object, otherwise false
180
+ */
181
+ const isPlainObject = (val: unknown): boolean => {
182
+ if (!isObject(val)) {
183
+ return false;
184
+ }
185
+
186
+ const prototype = getPrototypeOf(val);
187
+ return (
188
+ (prototype === null ||
189
+ prototype === Object.prototype ||
190
+ getPrototypeOf(prototype) === null) &&
191
+ // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
192
+ // Symbol.iterator as evidence the value is a tagged/iterable type rather
193
+ // than a plain object, while ignoring keys injected onto Object.prototype.
194
+ !hasOwnInPrototypeChain(val, toStringTag) &&
195
+ !hasOwnInPrototypeChain(val, iterator)
196
+ );
197
+ };
198
+
199
+ /**
200
+ * Determine if a value is an empty object (safely handles Buffers)
201
+ *
202
+ * @param {*} val The value to test
203
+ *
204
+ * @returns {boolean} True if value is an empty object, otherwise false
205
+ */
206
+ const isEmptyObject = (val: unknown): boolean => {
207
+ // Early return for non-objects or Buffers to prevent RangeError
208
+ if (!isObject(val) || isBuffer(val)) {
209
+ return false;
210
+ }
211
+
212
+ try {
213
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
214
+ }
215
+ catch {
216
+ // Fallback for any other objects that might cause RangeError with Object.keys()
217
+ return false;
218
+ }
219
+ };
220
+
221
+ /**
222
+ * Determine if a value is a Date
223
+ *
224
+ * @param {*} val The value to test
225
+ *
226
+ * @returns {boolean} True if value is a Date, otherwise false
227
+ */
228
+ const isDate = kindOfTest("Date");
229
+
230
+ /**
231
+ * Determine if a value is a File
232
+ *
233
+ * @param {*} val The value to test
234
+ *
235
+ * @returns {boolean} True if value is a File, otherwise false
236
+ */
237
+ const isFile = kindOfTest("File");
238
+
239
+ /**
240
+ * Determine if a value is a React Native Blob
241
+ * React Native "blob": an object with a `uri` attribute. Optionally, it can
242
+ * also have a `name` and `type` attribute to specify filename and content type
243
+ *
244
+ * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
245
+ *
246
+ * @param {*} value The value to test
247
+ *
248
+ * @returns {boolean} True if value is a React Native Blob, otherwise false
249
+ */
250
+ const isReactNativeBlob = (value: unknown) => !!(value && typeof (value as Record<string, unknown>).uri !== "undefined");
251
+
252
+ /**
253
+ * Determine if environment is React Native
254
+ * ReactNative `FormData` has a non-standard `getParts()` method
255
+ *
256
+ * @param {*} formData The formData to test
257
+ *
258
+ * @returns {boolean} True if environment is React Native, otherwise false
259
+ */
260
+ const isReactNative = (formData: unknown) => formData && typeof (formData as Record<string, unknown>).getParts !== "undefined";
261
+
262
+ /**
263
+ * Determine if a value is a Blob
264
+ *
265
+ * @param {*} val The value to test
266
+ *
267
+ * @returns {boolean} True if value is a Blob, otherwise false
268
+ */
269
+ const isBlob = kindOfTest("Blob");
270
+
271
+ /**
272
+ * Determine if a value is a FileList
273
+ *
274
+ * @param {*} val The value to test
275
+ *
276
+ * @returns {boolean} True if value is a FileList, otherwise false
277
+ */
278
+ const isFileList = kindOfTest("FileList");
279
+
280
+ /**
281
+ * Determine if a value is a Stream
282
+ *
283
+ * @param {*} val The value to test
284
+ *
285
+ * @returns {boolean} True if value is a Stream, otherwise false
286
+ */
287
+ const isStream = (val: unknown) => isObject(val) && isFunction((val as Record<string, unknown>).pipe);
288
+
289
+ /**
290
+ * Determine if a value is a FormData
291
+ *
292
+ * @param {*} thing The value to test
293
+ *
294
+ * @returns {boolean} True if value is an FormData, otherwise false
295
+ */
296
+ const G: Record<string, unknown> = globalThis;
297
+ const FormDataCtor = typeof G["FormData"] !== "undefined" ? G["FormData"] as new () => object : undefined;
298
+
299
+ const isFormData = (thing: unknown): boolean => {
300
+ if (!thing) return false;
301
+ if (FormDataCtor && thing instanceof FormDataCtor) return true;
302
+ // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.
303
+ const proto = getPrototypeOf(thing);
304
+ if (!proto || proto === Object.prototype) return false;
305
+ if (!isFunction((thing as Record<string, unknown>).append)) return false;
306
+ const kind = kindOf(thing);
307
+ return (
308
+ kind === "formdata" ||
309
+ // detect form-data instance
310
+ (kind === "object" && isFunction((thing as Record<string, unknown>).toString) && (thing as { toString: () => string; }).toString() === "[object FormData]")
311
+ );
312
+ };
313
+
314
+ /**
315
+ * Determine if a value is a URLSearchParams object
316
+ *
317
+ * @param {*} val The value to test
318
+ *
319
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
320
+ */
321
+ const isURLSearchParams = kindOfTest("URLSearchParams");
322
+
323
+ const [ isReadableStream, isRequest, isResponse, isHeaders ] = [
324
+ "ReadableStream",
325
+ "Request",
326
+ "Response",
327
+ "Headers",
328
+ ].map(kindOfTest);
329
+
330
+ /**
331
+ * Iterate over an Array or an Object invoking a function for each item.
332
+ *
333
+ * If `obj` is an Array callback will be called passing
334
+ * the value, index, and complete array for each item.
335
+ *
336
+ * If 'obj' is an Object callback will be called passing
337
+ * the value, key, and complete object for each property.
338
+ *
339
+ * @param {Object|Array<unknown>} obj The object to iterate
340
+ * @param {Function} fn The callback to invoke for each item
341
+ *
342
+ * @param {Object} [options]
343
+ * @param {Boolean} [options.allOwnKeys = false]
344
+ * @returns {any}
345
+ */
346
+ function forEach(obj: unknown, fn: (value: unknown, key: unknown, obj: unknown) => void, { allOwnKeys = false } = {}): void {
347
+ // Don't bother if no value provided
348
+ if (obj === null || typeof obj === "undefined") {
349
+ return;
350
+ }
351
+
352
+ let i: number;
353
+ let l: number;
354
+
355
+ // Force an array if not already something iterable
356
+ if (typeof obj !== "object") {
357
+ /*eslint no-param-reassign:0*/
358
+ obj = [ obj ];
359
+ }
360
+
361
+ if (isArray(obj)) {
362
+ // Iterate over array values
363
+ for (i = 0, l = obj.length; i < l; i++) {
364
+ fn.call(null, obj[i], i, obj);
365
+ }
366
+ }
367
+ else {
368
+ // Buffer check
369
+ if (isBuffer(obj)) {
370
+ return;
371
+ }
372
+
373
+ // Iterate over object keys
374
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj as object);
375
+ const len = keys.length;
376
+ let key: string | undefined;
377
+
378
+ for (i = 0; i < len; i++) {
379
+ key = keys[i]!;
380
+ fn.call(null, (obj as Record<string, unknown>)[key], key, obj);
381
+ }
382
+ }
383
+ }
384
+
385
+ /**
386
+ * Finds a key in an object, case-insensitive, returning the actual key name.
387
+ * Returns null if the object is a Buffer or if no match is found.
388
+ *
389
+ * @param {Object} obj - The object to search.
390
+ * @param {string} key - The key to find (case-insensitive).
391
+ * @returns {?string} The actual key name if found, otherwise null.
392
+ */
393
+ function findKey(obj: unknown, key: string): string | null {
394
+ if (isBuffer(obj)) {
395
+ return null;
396
+ }
397
+
398
+ key = key.toLowerCase();
399
+ const keys = Object.keys(obj as object);
400
+ let i = keys.length;
401
+ let _key: string | undefined;
402
+ while (i-- > 0) {
403
+ _key = keys[i]!;
404
+ if (key === _key.toLowerCase()) {
405
+ return _key;
406
+ }
407
+ }
408
+ return null;
409
+ }
410
+
411
+ type GlobalWithEvents = typeof globalThis & {
412
+ addEventListener?: (type: string, listener: (event: Record<string, unknown>) => void, capture?: boolean) => void;
413
+ postMessage?: (message: unknown, targetOrigin: string) => void;
414
+ setImmediate?: (cb: () => void) => void;
415
+ process?: { nextTick?: (cb: () => void) => void; };
416
+ };
417
+ const _global = globalThis as GlobalWithEvents;
418
+
419
+ const isContextDefined = (context: unknown) => !isUndefined(context) && context !== _global;
420
+
421
+ /**
422
+ * Accepts varargs expecting each argument to be an object, then
423
+ * immutably merges the properties of each object and returns result.
424
+ *
425
+ * When multiple objects contain the same key the later object in
426
+ * the arguments list will take precedence.
427
+ *
428
+ * Example:
429
+ *
430
+ * ```js
431
+ * const result = merge({foo: 123}, {foo: 456});
432
+ * console.log(result.foo); // outputs 456
433
+ * ```
434
+ *
435
+ * @param {Object} obj1 Object to merge
436
+ *
437
+ * @returns {Object} Result of all merge properties
438
+ */
439
+ function merge(this: unknown, ...objs: Array<unknown>): Record<string, unknown> {
440
+ const ctx = (isContextDefined(this) && this) as { caseless?: unknown; skipUndefined?: unknown; } | false;
441
+ const caseless = ctx && ctx.caseless;
442
+ const skipUndefined = ctx && ctx.skipUndefined;
443
+ const result: Record<string | symbol, unknown> = {};
444
+ const assignValue = (val: unknown, key: unknown) => {
445
+ const keyStr = key as string | symbol;
446
+ // Skip dangerous property names to prevent prototype pollution
447
+ if (keyStr === "__proto__" || keyStr === "constructor" || keyStr === "prototype") {
448
+ return;
449
+ }
450
+
451
+ // findKey lowercases the key, so caseless lookup only applies to strings —
452
+ // symbol keys are identity-matched.
453
+ const targetKey: string | symbol = (caseless && typeof keyStr === "string" ? (findKey(result, keyStr) ?? (keyStr)) : (keyStr));
454
+ // Read via own-prop only — a bare `result[targetKey]` walks the prototype
455
+ // chain, so a polluted Object.prototype value could surface here and get
456
+ // copied into the merged result.
457
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;
458
+ if (isPlainObject(existing) && isPlainObject(val)) {
459
+ result[targetKey] = merge(existing, val);
460
+ }
461
+ else if (isPlainObject(val)) {
462
+ result[targetKey] = merge({}, val);
463
+ }
464
+ else if (isArray(val)) {
465
+ result[targetKey] = val.slice();
466
+ }
467
+ else if (!skipUndefined || !isUndefined(val)) {
468
+ result[targetKey] = val;
469
+ }
470
+ };
471
+
472
+ for (let i = 0, l = objs.length; i < l; i++) {
473
+ const source = objs[i];
474
+ if (!source || isBuffer(source)) {
475
+ continue;
476
+ }
477
+
478
+ forEach(source, assignValue);
479
+
480
+ if (typeof source !== "object" || isArray(source)) {
481
+ continue;
482
+ }
483
+
484
+ const symbols = Object.getOwnPropertySymbols(source);
485
+ for (let j = 0; j < symbols.length; j++) {
486
+ const symbol = symbols[j]!;
487
+ if (propertyIsEnumerable.call(source, symbol)) {
488
+ assignValue((source as Record<symbol, unknown>)[symbol], symbol);
489
+ }
490
+ }
491
+ }
492
+ return result;
493
+ }
494
+
495
+ /**
496
+ * Extends object a by mutably adding to it the properties of object b.
497
+ *
498
+ * @param {Object} a The object to be extended
499
+ * @param {Object} b The object to copy properties from
500
+ * @param {Object} thisArg The object to bind function to
501
+ *
502
+ * @param {Object} [options]
503
+ * @param {Boolean} [options.allOwnKeys]
504
+ * @returns {Object} The resulting value of object a
505
+ */
506
+ const extend = (a: Record<string, unknown>, b: unknown, thisArg: unknown, { allOwnKeys }: { allOwnKeys?: boolean; } = {}) => {
507
+ forEach(
508
+ b,
509
+ (val, key) => {
510
+ if (thisArg && isFunction(val)) {
511
+ Object.defineProperty(a, key as PropertyKey, Object.assign(Object.create(null) as PropertyDescriptor, {
512
+ value: (val as (...args: Array<unknown>) => unknown).bind(thisArg),
513
+ writable: true,
514
+ enumerable: true,
515
+ configurable: true,
516
+ }));
517
+ }
518
+ else {
519
+ Object.defineProperty(a, key as PropertyKey, Object.assign(Object.create(null) as PropertyDescriptor, {
520
+ value: val,
521
+ writable: true,
522
+ enumerable: true,
523
+ configurable: true,
524
+ }));
525
+ }
526
+ },
527
+ { allOwnKeys }
528
+ );
529
+ return a;
530
+ };
531
+
532
+ /**
533
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
534
+ *
535
+ * @param {string} content with BOM
536
+ *
537
+ * @returns {string} content value without BOM
538
+ */
539
+ const stripBOM = (content: string) => {
540
+ if (content.charCodeAt(0) === 0xfeff) {
541
+ content = content.slice(1);
542
+ }
543
+ return content;
544
+ };
545
+
546
+ /**
547
+ * Resolve object with deep prototype chain to a flat object
548
+ * @param {Object} sourceObj source object
549
+ * @param {Object} [destObj]
550
+ * @param {Function|Boolean} [filter]
551
+ * @param {Function} [propFilter]
552
+ *
553
+ * @returns {Object}
554
+ */
555
+ const toFlatObject = (sourceObj: unknown, destObj?: Record<string, unknown>, filter?: ((src: object, dest: Record<string, unknown>) => boolean) | false, propFilter?: (prop: string, src: unknown, dest: Record<string, unknown>) => boolean): Record<string, unknown> => {
556
+ let props: Array<string>;
557
+ let i: number;
558
+ let prop: string | undefined;
559
+ const merged: Record<string, boolean> = {};
560
+
561
+ const dest: Record<string, unknown> = destObj ?? {};
562
+
563
+ if (sourceObj == null) return dest;
564
+
565
+ let src: unknown = sourceObj;
566
+
567
+ do {
568
+ props = Object.getOwnPropertyNames(src);
569
+ i = props.length;
570
+ while (i-- > 0) {
571
+ prop = props[i]!;
572
+ if ((!propFilter || propFilter(prop, src, dest)) && !merged[prop]) {
573
+ dest[prop] = (src as Record<string, unknown>)[prop];
574
+ merged[prop] = true;
575
+ }
576
+ }
577
+ src = filter !== false && getPrototypeOf(src);
578
+ } while (src && (!filter || filter(src, dest)) && src !== Object.prototype);
579
+
580
+ return dest;
581
+ };
582
+
583
+ const toArray = (thing?: unknown): Array<unknown> | null => {
584
+ if (!thing) return null;
585
+ if (isArray(thing)) return thing;
586
+ if (!isNumber((thing as { length?: unknown; }).length)) return null;
587
+ return Array.from(thing as ArrayLike<unknown>);
588
+ };
589
+
590
+ /**
591
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
592
+ * thing passed in is an instance of Uint8Array
593
+ *
594
+ * @param {TypedArray}
595
+ *
596
+ * @returns {Array}
597
+ */
598
+
599
+ const isTypedArray = ((TypedArray: false | (abstract new (...args: Array<unknown>) => unknown)) =>
600
+
601
+ (thing: unknown) => TypedArray && thing instanceof TypedArray
602
+ )(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array) as abstract new (...args: Array<unknown>) => unknown);
603
+
604
+ const forEachEntry = (obj: unknown, fn: (key: unknown, value: unknown) => void) => {
605
+ for (const [ key, value ] of obj as Iterable<[unknown, unknown]>) {
606
+ fn.call(obj, key, value);
607
+ }
608
+ };
609
+
610
+ /**
611
+ * It takes a regular expression and a string, and returns an array of all the matches
612
+ *
613
+ * @param {string} regExp - The regular expression to match against.
614
+ * @param {string} str - The string to search.
615
+ *
616
+ * @returns {Array<boolean>}
617
+ */
618
+ const matchAll = (regExp: RegExp, str: string) => {
619
+ let matches: RegExpExecArray | null;
620
+ const arr: Array<RegExpExecArray> = [];
621
+
622
+ while ((matches = regExp.exec(str)) !== null) {
623
+ arr.push(matches);
624
+ }
625
+
626
+ return arr;
627
+ };
628
+
629
+ /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
630
+ const isHTMLForm = kindOfTest("HTMLFormElement");
631
+
632
+ const toCamelCase = (str: string) => str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(_m: string, p1: string, p2: string) {
633
+ return p1.toUpperCase() + p2;
634
+ });
635
+
636
+ const { propertyIsEnumerable } = Object.prototype;
637
+
638
+ /**
639
+ * Determine if a value is a RegExp object
640
+ *
641
+ * @param {*} val The value to test
642
+ *
643
+ * @returns {boolean} True if value is a RegExp object, otherwise false
644
+ */
645
+ const isRegExp = kindOfTest("RegExp");
646
+
647
+ const reduceDescriptors = (obj: object, reducer: (descriptor: PropertyDescriptor, name: string, obj: object) => PropertyDescriptor | false | undefined) => {
648
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
649
+ const reducedDescriptors: PropertyDescriptorMap = {};
650
+
651
+ forEach(descriptors, (descriptor, name) => {
652
+ let ret;
653
+ if ((ret = reducer(descriptor as PropertyDescriptor, name as string, obj)) !== false) {
654
+ reducedDescriptors[name as string] = ret ?? (descriptor as PropertyDescriptor);
655
+ }
656
+ });
657
+
658
+ Object.defineProperties(obj, reducedDescriptors);
659
+ };
660
+
661
+ /**
662
+ * Makes all methods read-only
663
+ * @param {Object} obj
664
+ */
665
+
666
+ const freezeMethods = (obj: object) => {
667
+ // eslint-disable-next-line sonarjs/function-return-type
668
+ reduceDescriptors(obj, (descriptor, name): PropertyDescriptor | false => {
669
+ // skip restricted props in strict mode
670
+ if (isFunction(obj) && [ "arguments", "caller", "callee" ].includes(name)) {
671
+ return false;
672
+ }
673
+
674
+ const value = (obj as Record<string, unknown>)[name];
675
+
676
+ if (!isFunction(value)) return false;
677
+
678
+ descriptor.enumerable = false;
679
+
680
+ if ("writable" in descriptor) {
681
+ descriptor.writable = false;
682
+ return descriptor;
683
+ }
684
+
685
+ if (!descriptor.set) {
686
+ descriptor.set = () => {
687
+ throw Error("Can not rewrite read-only method '" + name + "'");
688
+ };
689
+ }
690
+ return descriptor;
691
+ });
692
+ };
693
+
694
+ /**
695
+ * Converts an array or a delimited string into an object set with values as keys and true as values.
696
+ * Useful for fast membership checks.
697
+ *
698
+ * @param {Array|string} arrayOrString - The array or string to convert.
699
+ * @param {string} delimiter - The delimiter to use if input is a string.
700
+ * @returns {Object} An object with keys from the array or string, values set to true.
701
+ */
702
+ const toObjectSet = (arrayOrString: Array<unknown> | string, delimiter: string) => {
703
+ const obj: Record<string, boolean> = {};
704
+
705
+ const define = (arr: Array<unknown>) => {
706
+ arr.forEach(value => {
707
+ obj[value as string] = true;
708
+ });
709
+ };
710
+
711
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
712
+
713
+ return obj;
714
+ };
715
+
716
+ const noop = () => {};
717
+
718
+ const toFiniteNumber = (value: unknown, defaultValue?: number) => {
719
+ const num = +(value as number);
720
+ return value != null && Number.isFinite(num) ? num : defaultValue;
721
+ };
722
+
723
+ /**
724
+ * If the thing is a FormData object, return true, otherwise return false.
725
+ *
726
+ * @param {unknown} thing - The thing to check.
727
+ *
728
+ * @returns {boolean}
729
+ */
730
+ function isSpecCompliantForm(thing: unknown): boolean {
731
+ return !!(
732
+ thing &&
733
+ isFunction((thing as Record<string | symbol, unknown>).append) &&
734
+ (thing as Record<string | symbol, unknown>)[toStringTag] === "FormData" &&
735
+ (thing as Record<string | symbol, unknown>)[iterator]
736
+ );
737
+ }
738
+
739
+ /**
740
+ * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
741
+ *
742
+ * @param {Object} obj - The object to convert.
743
+ * @returns {Object} The JSON-compatible object.
744
+ */
745
+ const toJSONObject = (obj: unknown): unknown => {
746
+ const visited = new WeakSet<object>();
747
+
748
+ const visit = (source: unknown): unknown => {
749
+ if (isObject(source)) {
750
+ if (visited.has(source)) {
751
+ return;
752
+ }
753
+
754
+ //Buffer check
755
+ if (isBuffer(source)) {
756
+ return source;
757
+ }
758
+
759
+ if (!("toJSON" in source)) {
760
+ // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).
761
+ visited.add(source);
762
+ const target: Record<string | number, unknown> = isArray(source) ? ([] as Record<number, unknown>) : {};
763
+
764
+ forEach(source, (value, key) => {
765
+ const reducedValue = visit(value);
766
+ !isUndefined(reducedValue) && (target[key as string] = reducedValue);
767
+ });
768
+
769
+ visited.delete(source);
770
+
771
+ return target;
772
+ }
773
+ }
774
+
775
+ return source;
776
+ };
777
+
778
+ return visit(obj);
779
+ };
780
+
781
+ /**
782
+ * Determines if a value is an async function.
783
+ *
784
+ * @param {*} thing - The value to test.
785
+ * @returns {boolean} True if value is an async function, otherwise false.
786
+ */
787
+ const isAsyncFn = kindOfTest("AsyncFunction");
788
+
789
+ /**
790
+ * Determines if a value is thenable (has then and catch methods).
791
+ *
792
+ * @param {*} thing - The value to test.
793
+ * @returns {boolean} True if value is thenable, otherwise false.
794
+ */
795
+ const isThenable = (thing: unknown) =>
796
+ thing &&
797
+ (isObject(thing) || isFunction(thing)) &&
798
+ isFunction((thing as Record<string, unknown>).then) &&
799
+ isFunction((thing as Record<string, unknown>).catch);
800
+
801
+ // original code
802
+ // https://github.com/DigitalBrainJS/FaxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
803
+
804
+ /**
805
+ * Provides a cross-platform setImmediate implementation.
806
+ * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
807
+ *
808
+ * @param {boolean} setImmediateSupported - Whether setImmediate is supported.
809
+ * @param {boolean} postMessageSupported - Whether postMessage is supported.
810
+ * @returns {Function} A function to schedule a callback asynchronously.
811
+ */
812
+ const _setImmediate = ((setImmediateSupported: boolean, postMessageSupported: boolean) => {
813
+ if (setImmediateSupported) {
814
+ return (_global["setImmediate"] as (cb: () => void) => unknown);
815
+ }
816
+
817
+ return postMessageSupported
818
+ ? ((token: string, callbacks: Array<() => void>) => {
819
+ const _addEventListener = _global.addEventListener as NonNullable<GlobalWithEvents["addEventListener"]>;
820
+ _addEventListener(
821
+ "message",
822
+ (evt: Record<string, unknown>) => {
823
+ if (evt["source"] === _global && evt["data"] === token) {
824
+ callbacks.length && callbacks.shift()!();
825
+ }
826
+ },
827
+ false
828
+ );
829
+
830
+ const _postMessage = _global.postMessage as NonNullable<GlobalWithEvents["postMessage"]>;
831
+
832
+ return (cb: () => void) => {
833
+ callbacks.push(cb);
834
+ _postMessage(token, "*");
835
+ };
836
+ // eslint-disable-next-line sonarjs/pseudo-random
837
+ })(`faxios@${Math.random()}`, [])
838
+ : (cb: () => void) => setTimeout(cb);
839
+ })(isFunction(_global["setImmediate"]), isFunction(_global["postMessage"]));
840
+
841
+ /**
842
+ * Schedules a microtask or asynchronous callback as soon as possible.
843
+ * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
844
+ *
845
+ * @type {Function}
846
+ */
847
+
848
+ const _process = _global["process"];
849
+ const asap =
850
+ typeof queueMicrotask !== "undefined"
851
+ ? queueMicrotask.bind(globalThis)
852
+ : (_process && _process.nextTick) || _setImmediate;
853
+
854
+ // *********************
855
+
856
+ const isIterable = (thing: unknown) => thing != null && isFunction((thing as Record<symbol, unknown>)[iterator]);
857
+
858
+ /**
859
+ * Determine if a value is iterable via an iterator that is NOT sourced solely
860
+ * from a polluted Object.prototype. Use this instead of `isIterable` whenever
861
+ * the iterable comes from untrusted input (e.g. user-supplied header sources),
862
+ * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
863
+ * into an attacker-controlled entries iterator.
864
+ *
865
+ * @param {*} thing The value to test
866
+ *
867
+ * @returns {boolean} True if value has a non-polluted iterator
868
+ */
869
+ const isSafeIterable = (thing: unknown) =>
870
+ thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
871
+
872
+ export default {
873
+ isArray,
874
+ isArrayBuffer,
875
+ isBuffer,
876
+ isFormData,
877
+ isArrayBufferView,
878
+ isString,
879
+ isNumber,
880
+ isBoolean,
881
+ isObject,
882
+ isPlainObject,
883
+ isEmptyObject,
884
+ isReadableStream,
885
+ isRequest,
886
+ isResponse,
887
+ isHeaders,
888
+ isUndefined,
889
+ isDate,
890
+ isFile,
891
+ isReactNativeBlob,
892
+ isReactNative,
893
+ isBlob,
894
+ isRegExp,
895
+ isFunction,
896
+ isStream,
897
+ isURLSearchParams,
898
+ isTypedArray,
899
+ isFileList,
900
+ forEach,
901
+ merge,
902
+ extend,
903
+ stripBOM,
904
+ toFlatObject,
905
+ kindOf,
906
+ kindOfTest,
907
+ toArray,
908
+ forEachEntry,
909
+ matchAll,
910
+ isHTMLForm,
911
+ hasOwnProperty,
912
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
913
+ hasOwnInPrototypeChain,
914
+ getSafeProp,
915
+ reduceDescriptors,
916
+ freezeMethods,
917
+ toObjectSet,
918
+ toCamelCase,
919
+ noop,
920
+ toFiniteNumber,
921
+ findKey,
922
+ global: _global,
923
+ isContextDefined,
924
+ isSpecCompliantForm,
925
+ toJSONObject,
926
+ isAsyncFn,
927
+ isThenable,
928
+ setImmediate: _setImmediate,
929
+ asap,
930
+ isIterable,
931
+ isSafeIterable,
932
+ };