ShopAI-Extension/scripts/utils/URLs.js
2024-05-05 23:00:09 +08:00

16 lines
No EOL
252 B
JavaScript

/*
URL tools
*/
class URLs {
/*
Remove the protocol from the URL.
@param {string} URL the URL to clean
*/
static clean(URL) {
return((URL.trim().replace(/(^\w+:|^)\/\//, ``).split(`?`))[0]);
}
}
export {URLs};