2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

Merge pull request #317 from nickuraltsev/urlsearchparams

Adding support for URLSearchParams
This commit is contained in:
Matt Zabriskie
2016-05-24 20:40:25 -06:00
11 changed files with 100 additions and 20 deletions
+11
View File
@@ -142,6 +142,16 @@ function isStream(val) {
return isObject(val) && isFunction(val.pipe);
}
/**
* Determine if a value is a URLSearchParams object
*
* @param {Object} val The value to test
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
*/
function isURLSearchParams(val) {
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
}
/**
* Trim excess whitespace off the beginning and end of a string
*
@@ -259,6 +269,7 @@ module.exports = {
isBlob: isBlob,
isFunction: isFunction,
isStream: isStream,
isURLSearchParams: isURLSearchParams,
isStandardBrowserEnv: isStandardBrowserEnv,
forEach: forEach,
merge: merge,