* Determine if a value is a FormData * * @param {*} thing The value to test * * @returns {boolean} True if value is an FormData, otherwise false
()
| 300 | * @returns {boolean} True if value is an FormData, otherwise false |
| 301 | */ |
| 302 | function getGlobal() { |
| 303 | if (typeof globalThis !== 'undefined') return globalThis; |
| 304 | if (typeof self !== 'undefined') return self; |
| 305 | if (typeof window !== 'undefined') return window; |
| 306 | if (typeof global !== 'undefined') return global; |
| 307 | return {}; |
| 308 | } |
| 309 | |
| 310 | const G = getGlobal(); |
| 311 | const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; |