b9j.path provides a way to parse, manipulate, and generate URI/UNIX-style paths.

CPAN provides lots of different options for path-handling and path-manipulation, but there didn't seem to be anything really available in JavaScript-land.

To fill the gap, I've released b9j.path:

 var path = new b9j.path.Path("/a/b/c")

 // /a/b/c/xyzzy
 var child = path.child("xyzzy")

 // /a/b
 var parent = path.parent()

 // ... and much, much, more...

It's part of my b9j javascript pack available at: http://appengine.bravo9.com/b9j/b9j-latest.zip

» Download

» Documentation

» Test


π