Files
traxxx/src/utils/url.js
DebaucheryLibrarian 74fbe29db5 Added URL util to repo.
2024-06-04 03:34:09 +02:00

16 lines
189 B
JavaScript

'use strict';
function stripQuery(url) {
if (!url) {
return null;
}
const { origin, pathname } = new URL(url);
return `${origin}${pathname}`;
}
module.exports = {
stripQuery,
};