unjs/ufo

Can the stringifyParsedURL method support non-ParseDURL type passing?

Closed this issue · 1 comments

Describe the feature

When I call stringifyParsedURL method, pass parameters I only passed the protocol and the combination of the host, other fields are not passed, this will make them return to an www.example.comundefinedundefined url,

stringifyParsedURL({
    protocol,
    host,
 });

Can we support this parameter passing? The reason for this demand is that I am doing a download website favicon.ico file function, which needs to be automatically obtained according to the url entered by the user, without entering the complete ico url, the server will automatically splicing

If you agree, I would like to offer pr for this, thank you for writing such a good library of Ufos

Additional information

  • Would you be willing to help implement this feature?
pi0 commented

That's a good idea! This will be supported in next release.