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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user