node-curried-paths
This lets you create functions that behave similarly to path.join(), rooted at specified directories. You can then create new functions, recursively, for subdirectories.
For example:
var curriedPath = ;var process = ; // Curried path for the current working directoryvar work = ;; //=> string representation of cwd; //=> `cwd`/sub; //=> `cwd`/sub/sub; //=> grandparent of `cwd` // Create a new function for a subdirectoryvar test = work;; //=> `cwd`/test; //=> `cwd`/test/sub1/sub2