lib/utils.js
function join(args) {
  var arg;
  var i = 0;
  var path = '';

  if (arguments.length === 0) {
    return utils.sep;
  }

  while ((arg = arguments[i++])) {
    if (typeof arg !== 'string') {
      throw new TypeError('utils.join() expects string arguments');
    }

    path += utils.sep + arg;
  }

  path = path.replace(/\/+/g, utils.sep);
  if (path[path.length - 1] === utils.sep) {
    path = path.substring(0, path.length - 1);
  }
  return path;
}
function join(args) {
  var arg;
  var i = 0;
  var path = '';

  if (arguments.length === 0) {
    return utils.sep;
  }

  while ((arg = arguments[i++])) {
    if (typeof arg !== 'string') {
      throw new TypeError('utils.join() expects string arguments');
    }

    path += utils.sep + arg;
  }

  path = path.replace(/\/+/g, utils.sep);
  if (path[path.length - 1] === utils.sep) {
    path = path.substring(0, path.length - 1);
  }
  return path;
}
function join ( args ) { var arg ; var i = 0 ; var path = '' ; if ( arguments . length === 0 ) { return utils . sep ; } while ( ( arg = arguments [ i ++ ] ) ) { if ( typeof arg !== 'string' ) { throw new TypeError ( 'utils.join() expects string arguments' ) ; } path += utils . sep + arg ; } path = path . replace ( / \/+ / g , utils . sep ) ; if ( path [ path . length - 1 ] === utils . sep ) { path = path . substring ( 0 , path . length - 1 ) ; } return path ; }
Join paths.

@param {...String} args Paths
@returns {String}
Join paths .