Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
url: expose pathToFileURL and fileURLToPath #22506
As discussed in #22502 this exposes and documents
@TimothyGu what concerns do you have about input ambiguity here? Because URL strings are encouraged by the WhatWG spec (despite any performance concerns), I'm very much for functions permitting URL strings or URL objects equally. I think cases to worry about is string parsing where different cases of strings are permitted like with the fs functions, but as we have been doing allowing URL strings or objects equally seems to me a good pattern generally to avoid the performance issues while still allowing "supposed" best practices.