path: added parse() and format() functions
authorRory Bradford <roryrjb@gmail.com>
Tue, 8 Apr 2014 21:48:24 +0000 (22:48 +0100)
committerChris Dickinson <christopher.s.dickinson@gmail.com>
Fri, 21 Nov 2014 00:21:11 +0000 (16:21 -0800)
commit2d17193f20930bfe594d7008fe5c08f813f03c7b
tree245fde7d181d5600bc23b8a2567e2503dcd6e4ce
parent6a90a060023dac4fc827613243e496237403f29f
path: added parse() and format() functions

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. Fixes #6976.

Fixes: https://github.com/joyent/node/issues/6976
PR-URL: https://github.com/joyent/node/pull/8750
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
doc/api/path.markdown
lib/path.js
test/simple/test-path-parse-format.js [new file with mode: 0644]