2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

style: fix word spelling ang lint style in comment (#4500)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Jingyi Lin
2022-05-04 03:12:16 +08:00
committed by GitHub
parent 3479ca7c76
commit ba85e0e385
2 changed files with 15 additions and 15 deletions
+12 -12
View File
@@ -13,16 +13,16 @@ module.exports = (
var originURL;
/**
* Parse a URL to discover it's components
*
* @param {String} url The URL to be parsed
* @returns {Object}
*/
* Parse a URL to discover it's components
*
* @param {String} url The URL to be parsed
* @returns {Object}
*/
function resolveURL(url) {
var href = url;
if (msie) {
// IE needs attribute set twice to normalize properties
// IE needs attribute set twice to normalize properties
urlParsingNode.setAttribute('href', href);
href = urlParsingNode.href;
}
@@ -47,11 +47,11 @@ module.exports = (
originURL = resolveURL(window.location.href);
/**
* Determine if a URL shares the same origin as the current location
*
* @param {String} requestURL The URL to test
* @returns {boolean} True if URL shares the same origin, otherwise false
*/
* Determine if a URL shares the same origin as the current location
*
* @param {String} requestURL The URL to test
* @returns {boolean} True if URL shares the same origin, otherwise false
*/
return function isURLSameOrigin(requestURL) {
var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
return (parsed.protocol === originURL.protocol &&
@@ -59,7 +59,7 @@ module.exports = (
};
})() :
// Non standard browser envs (web workers, react-native) lack needed support.
// Non standard browser envs (web workers, react-native) lack needed support.
(function nonStandardBrowserEnv() {
return function isURLSameOrigin() {
return true;