Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path.join universal front - backslash not implemented #31

Open
chopin2256 opened this issue Jun 29, 2023 · 1 comment
Open

path.join universal front - backslash not implemented #31

chopin2256 opened this issue Jun 29, 2023 · 1 comment

Comments

@chopin2256
Copy link

Node's version of path.join converts the front or backslash appropriately depending on the operating system. For example, windows uses a frontslash for its directories. And linux and mac use a backslash for their directories.

The issue is when coding on Windows, you must use a frontslash. But when deploying on Mac, it must be converted to a backslash. This presents a portability issue.

Node's "join" actually handles this quite simply using conditionals to determine which operating system the user is on. But this version does not handle the front/backslash problem. Is it possible to implement Node's version of "join" in this module?

@chopin2256
Copy link
Author

Examples:

path.join("a\b\c") on Windows gives "a/b/c"
path.join("a/b/c") on Linux gives "a\b\c"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant