-
Notifications
You must be signed in to change notification settings - Fork 30k
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
docs: explain why path.posix.normalize does not replace windows slashes #12700
Changes from 2 commits
c6f50de
91bb7fa
cfaeba4
b4eda57
7dd712f
cb7d451
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -416,6 +416,16 @@ added: v0.11.15 | |
The `path.posix` property provides access to POSIX specific implementations | ||
of the `path` methods. | ||
|
||
### path.posix.normalize(path) | ||
The `path.posix.normalize()` method will not attempt to convert / (Windows) to | ||
\ (POSIX), as / is not recognized by POSIX as a valid directory separator. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duh...should have realized I had that backwards There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the comment may have these backwards. The windows separator |
||
|
||
For example: | ||
```js | ||
path.posix.normalize("/some/thing/like/this") | ||
//Returns '/some/thing/like/this' | ||
``` | ||
|
||
## path.relative(from, to) | ||
<!-- YAML | ||
added: v0.5.0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this note belongs in the
normalize()
documentation, not as a different subsection inpath.posix
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I still give it a heading or would it be better as just a note after "For Example, on POSIX" at 327
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't give it a heading.