-
Notifications
You must be signed in to change notification settings - Fork 7.3k
path: added parse() and format() functions #7429
Conversation
Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion. Commit roryrjb/node@a644319aaa0e323b28d5cac6099f65d24f3a16db has the following error(s):
The following commiters were not found in the CLA:
You can fix all these things without opening another issue. Please see CONTRIBUTING.md for more information |
The parse() function splits a path and returns an object with the different elements. The format() function is the reverse of this and adds an objects corresponding path elements to make up a string. #6976
I amended the commit message in 06df525 so any of the lines aren't too long. |
Add tests for Windows UNC paths? |
also fixed UNC path bug.
@dougwilson thanks for that as there was a bug with parsing a UNC path, which I have now fixed in the latest commit. |
Now the CLA's no longer necessary; can one of the admins verify this patch? |
@@ -438,6 +462,34 @@ if (isWindows) { | |||
return outputParts.join('/'); | |||
}; | |||
|
|||
// Return all elements |
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.
duplicate
@Mithgol I certainly could land it if someone will fix the style. |
Hm... though, after more careful reading, I am not as certain as I was about it. Why do we really need it in core? |
Because |
The parse() function splits a path and returns an object with the different
elements. The format() function is the reverse of this and adds an objects
corresponding path elements to make up a string. #6976