dist/watJSON.browser.js
/**
	   * Make a path relative to a URL or another path.
	   *
	   * @param aRoot The root path or URL.
	   * @param aPath The path or URL to be made relative to aRoot.
	   */
Make a path relative to a URL or another path.
@param aRoot The root path or URL.
@param aPath The path or URL to be made relative to aRoot.
Make a path relative to a URL or another path . @param aRoot The root path or URL . @param aPath The path or URL to be made relative to aRoot .
function relative(aRoot, aPath) {
	    if (aRoot === "") {
	      aRoot = ".";
	    }
	    aRoot = aRoot.replace(/\/$/, '');
	    var url = urlParse(aRoot);
	    if (aPath.charAt(0) == "/" && url && url.path == "/") {
	      return aPath.slice(1);
	    }
	    return aPath.indexOf(aRoot + '/') === 0 ? aPath.substr(aRoot.length + 1) : aPath;
	  }
function relative ( aRoot , aPath ) { if ( aRoot === "" ) { aRoot = "." ; } aRoot = aRoot . replace ( / \/$ / , '' ) ; var url = urlParse ( aRoot ) ; if ( aPath . charAt ( 0 ) == "/" && url && url . path == "/" ) { return aPath . slice ( 1 ) ; } return aPath . indexOf ( aRoot + '/' ) === 0 ? aPath . substr ( aRoot . length + 1 ) : aPath ; }
Make a path relative to a URL or another path.
Make a path relative to a URL or another path .
// XXX: It is possible to remove this block, and the tests still pass!