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
its always nice to see posts about my favorite janguage JS on use.perl
Have you seen my JavaScript port of Moose called Joose. It might be interesting for you.
Re:Joose
grink on 2008-08-30T03:36:09
What, Perl isn't your favorite?
:) Joose looks very cool. JS's prototyping seems pretty powerful, but there's not a lot of sugar to make subclassing/traiting effortless.
Re:Joose
malte on 2008-09-01T17:30:12
Pretty much the same situation as with Perl, isn't it? I found programming with Joose to be much more productive than regular JS, because it is a much more declarative approach to programming. Plus if you already know Moose, most of the APIs should feel really natural. On an aside: While Moose still brings in a pretty heavy startup cost, Joose bootstraps in almost no time.