unjs / pathe

🛣️ Drop-in replacement of the Node.js's path module module that ensures paths are normalized

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose the internal `normalizeWindowsPath` method as a utility

Lehoczky opened this issue · comments

Describe the feature

It can be a helpful utility when expecting a file path from users.

Additional information

  • Would you be willing to help implement this feature?

Can you please elabaorate more on your usecase? why normal normalize is not usable?

You're absolutely right, thank you!

I was looking for a way to escape shell arguments, and the existing solutions I found online in threads and libraries all suggested doing something similar that normalizeWindowsPath does. Now stepping back a bit, and looking at normalize, it's a completely good function for this use case.

Thanks again, Pi!