It isn't as simple as nodejs url object doesn't have all nsIURI attributes:
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIURI#Attributes
prePath attribute doesn't exists in node.
Worse, some attributes behaves differently, like host, which include the port in node whereas it doesn't in nsIURI.