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