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

Removed import of url module in browser build due to significant size overhead; (#4594)

Removed pointless `Malformed URL` checking in  client build;
This commit is contained in:
Dmitriy Mozgovoy
2022-04-26 10:08:49 +03:00
committed by GitHub
parent cdd7add9b0
commit 4f7e3e3a7a
6 changed files with 849 additions and 717 deletions
-18
View File
@@ -22,22 +22,6 @@ function kindOfTest(type) {
};
}
/**
* Array with axios supported protocols.
*/
var supportedProtocols = [ 'http:', 'https:', 'file:' ];
/**
* Returns URL protocol passed as param if is not undefined or null,
* otherwise just returns 'http:'
*
* @param {String} protocol The String value of URL protocol
* @returns {String} Protocol if the value is not undefined or null
*/
function getProtocol(protocol) {
return protocol || 'http:';
}
/**
* Determine if a value is an Array
*
@@ -453,8 +437,6 @@ var isTypedArray = (function(TypedArray) {
})(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
module.exports = {
supportedProtocols: supportedProtocols,
getProtocol: getProtocol,
isArray: isArray,
isArrayBuffer: isArrayBuffer,
isBuffer: isBuffer,