feat: refactoring project
This commit is contained in:
14
node_modules/webpack/lib/util/URLAbsoluteSpecifier.js
generated
vendored
14
node_modules/webpack/lib/util/URLAbsoluteSpecifier.js
generated
vendored
@@ -36,7 +36,7 @@ function getScheme(specifier) {
|
||||
(start < aLowerCaseCharCode || start > zLowerCaseCharCode) &&
|
||||
(start < aUpperCaseCharCode || start > zUpperCaseCharCode)
|
||||
) {
|
||||
return undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
let i = 1;
|
||||
@@ -49,12 +49,12 @@ function getScheme(specifier) {
|
||||
ch === plusCharCode ||
|
||||
ch === hyphenCharCode
|
||||
) {
|
||||
if (++i === specifier.length) return undefined;
|
||||
if (++i === specifier.length) return;
|
||||
ch = specifier.charCodeAt(i);
|
||||
}
|
||||
|
||||
// Scheme must end with colon
|
||||
if (ch !== colonCharCode) return undefined;
|
||||
if (ch !== colonCharCode) return;
|
||||
|
||||
// Check for Windows absolute path
|
||||
// https://url.spec.whatwg.org/#url-miscellaneous
|
||||
@@ -67,7 +67,7 @@ function getScheme(specifier) {
|
||||
nextChar === hashCharCode ||
|
||||
nextChar === queryCharCode
|
||||
) {
|
||||
return undefined;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +80,8 @@ function getScheme(specifier) {
|
||||
*/
|
||||
function getProtocol(specifier) {
|
||||
const scheme = getScheme(specifier);
|
||||
return scheme === undefined ? undefined : scheme + ":";
|
||||
return scheme === undefined ? undefined : `${scheme}:`;
|
||||
}
|
||||
|
||||
exports.getScheme = getScheme;
|
||||
exports.getProtocol = getProtocol;
|
||||
module.exports.getScheme = getScheme;
|
||||
module.exports.getProtocol = getProtocol;
|
||||
|
||||
Reference in New Issue
Block a user