You want to extract the domain and all query parameters from a URL string in Node.js. Which approach correctly achieves this using the WHATWG URL API?
Aconst myURL = new URL(urlString);
const domain = myURL.hostname;
const params = Object.fromEntries(myURL.searchParams);
Bconst myURL = url.parse(urlString);
const domain = myURL.host;
const params = myURL.query;
Cconst myURL = new URL(urlString);
const domain = myURL.host;
const params = myURL.searchParams.toString();
Dconst myURL = new URL(urlString);
const domain = myURL.origin;
const params = myURL.searchParams.getAll();