mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +03:00
This reverts commit 73e3bdb883.
This commit is contained in:
+9
-15
@@ -47,6 +47,15 @@ function isArrayBuffer(val) {
|
||||
return toString.call(val) === '[object ArrayBuffer]';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is a FormData
|
||||
*
|
||||
* @param {Object} val The value to test
|
||||
* @returns {boolean} True if value is an FormData, otherwise false
|
||||
*/
|
||||
function isFormData(val) {
|
||||
return toString.call(val) === '[object FormData]';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is a view on an ArrayBuffer
|
||||
@@ -159,21 +168,6 @@ function isStream(val) {
|
||||
return isObject(val) && isFunction(val.pipe);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is a FormData
|
||||
*
|
||||
* @param {Object} thing The value to test
|
||||
* @returns {boolean} True if value is an FormData, otherwise false
|
||||
*/
|
||||
function isFormData(thing) {
|
||||
var pattern = '[object FormData]';
|
||||
return thing && (
|
||||
(typeof FormData === 'function' && thing instanceof FormData) ||
|
||||
toString.call(thing) === pattern ||
|
||||
(isFunction(thing.toString) && thing.toString() === pattern)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is a URLSearchParams object
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user