function urlJoin() {
    var args = Array.prototype.slice.call(arguments),
        prefixDoubleSlash = false,
        url;

    // Remove empty item at the beginning
    if (args[0] === '') {
        args.shift();
    }

    // Handle schemeless protocols
    if (args[0].indexOf('//') === 0) {
        prefixDoubleSlash = true;
    }

    // join the elements using a slash
    url = args.join('/');

    // Fix multiple slashes
    url = url.replace(/(^|[^:])\/\/+/g, '$1/');

    // Put the double slash back at the beginning if this was a schemeless protocol
    if (prefixDoubleSlash) {
        url = url.replace(/^\//, '//');
    }

    url = deduplicateSubDir(url);
    return url;
}
function urlJoin() {
    var args = Array.prototype.slice.call(arguments),
        prefixDoubleSlash = false,
        url;

    // Remove empty item at the beginning
    if (args[0] === '') {
        args.shift();
    }

    // Handle schemeless protocols
    if (args[0].indexOf('//') === 0) {
        prefixDoubleSlash = true;
    }

    // join the elements using a slash
    url = args.join('/');

    // Fix multiple slashes
    url = url.replace(/(^|[^:])\/\/+/g, '$1/');

    // Put the double slash back at the beginning if this was a schemeless protocol
    if (prefixDoubleSlash) {
        url = url.replace(/^\//, '//');
    }

    url = deduplicateSubDir(url);
    return url;
}
function urlJoin ( ) { var args = Array . prototype . slice . call ( arguments ) , prefixDoubleSlash = false , url ; // Remove empty item at the beginning if ( args [ 0 ] === '' ) { args . shift ( ) ; } // Handle schemeless protocols if ( args [ 0 ] . indexOf ( '//' ) === 0 ) { prefixDoubleSlash = true ; } // join the elements using a slash url = args . join ( '/' ) ; // Fix multiple slashes url = url . replace ( / (^|[^:])\/\/+ / g , '$1/' ) ; // Put the double slash back at the beginning if this was a schemeless protocol if ( prefixDoubleSlash ) { url = url . replace ( / ^\/ / , '//' ) ; } url = deduplicateSubDir ( url ) ; return url ; }
urlJoin
Returns a URL/path for internal use in Ghost.
@param {string} arguments takes arguments and concats those to a valid path/URL.
@return {string} URL concatinated URL/path of arguments.
urlJoin Returns a URL / path for internal use in Ghost .
Join the url elements