This is a vanilla zero-dependency implementation of URL and URLSearchParams, that should be able to run in any > ESM5 environment.
I needed these methods available (at least, a reasonably good ) inside a v8 sandbox, which only implements the standard library from ECMA, and doesn't include any of the more modern WHATWG methods.
This implementation combines the original node-url module from Node.js with the URLSearchParams polyfill from @lukeed/url-shim.