Pairtree.js is a project mainly written in JavaScript, it's free.
Pairtree in JavaScript
Pairtree.js is a JavaScript library for Pairtree. See https://wiki.ucop.edu/display/Curation/PairTree
INSTALL
In the browser, simply source the pairtree.js script found in lib/. For node, execute the following:
$ npm install pairtree
USAGE
var path = pairtree.path('someId');
var id = pairtree.id('/so/me/pa/ir/tr/ee/pa/th/');
For examples, see the test directory.