ui
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (url, options) {
|
||||
if (!options) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
options = {};
|
||||
} // eslint-disable-next-line no-underscore-dangle, no-param-reassign
|
||||
|
||||
|
||||
url = url && url.__esModule ? url.default : url;
|
||||
|
||||
if (typeof url !== 'string') {
|
||||
return url;
|
||||
}
|
||||
|
||||
if (options.hash) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
url += options.hash;
|
||||
}
|
||||
|
||||
if (options.maybeNeedQuotes && /[\t\n\f\r "'=<>`]/.test(url)) {
|
||||
return "\"".concat(url, "\"");
|
||||
}
|
||||
|
||||
return url;
|
||||
};
|
||||
Reference in New Issue
Block a user