Windows has a hard time handling path parts that end in a period. It would be great if you had a check that could look for that. Example:
c:\.\ <- OK
c:\x\..\ <- OK
c:\x.\y\ <- NOT OK
c:\x\y \ <- NOT OK
Perhaps this JS will do:
const isValidPath = path.split(sep).every((p) => p.length <= 1 || p === ".." || !p.endsWith(".") || !p.endsWith(" "))
Thanks for your package!