client/client.js
// Join and clean up paths (can also take a single argument to just clean it up)
Join and clean up paths (can also take a single argument to just clean it up)
Join and clean up paths ( can also take a single argument to just clean it up )
function join() {
    var i, l, parts = [],
      newParts = [];
    for (i = 0, l = arguments.length; i < l; i++) {
      if (typeof arguments[i] === "string") {
        parts = parts.concat(arguments[i].split("/"));
      }
    }
    for (i = 0, l = parts.length; i < l; i++) {
      if ((i === 0 && parts[i] === "") || parts[i] !== "") {
        newParts.push(parts[i]);
      }
    }
    return newParts.join("/") || "/";
  }
function join ( ) { var i , l , parts = [ ] , newParts = [ ] ; for ( i = 0 , l = arguments . length ; i < l ; i ++ ) { if ( typeof arguments [ i ] === "string" ) { parts = parts . concat ( arguments [ i ] . split ( "/" ) ) ; } } for ( i = 0 , l = parts . length ; i < l ; i ++ ) { if ( ( i === 0 && parts [ i ] === "" ) || parts [ i ] !== "" ) { newParts . push ( parts [ i ] ) ; } } return newParts . join ( "/" ) || "/" ; }
Join and clean up paths (can also take a single argument to just clean it up)
Join and clean up paths ( can also take a single argument to just clean it up )