Learn how to merge multiple URLSearchParams objects.
const a = new URLSearchParams() const b = new URLSearchParams() const combined = new URLSearchParams({ ...Object.fromEntries(a), ...Object.fromEntries(b), })