index.js
function htmlPath(dir) {
  var parts = dir.split('/');
  var crumb = new Array(parts.length);

  for (var i = 0; i < parts.length; i++) {
    var part = parts[i];

    if (part) {
      parts[i] = encodeURIComponent(part);
      crumb[i] = '<a href="' + escapeHtml(parts.slice(0, i + 1).join('/')) + '">' + escapeHtml(part) + '</a>';
    }
  }

  return crumb.join(' / ');
}
function htmlPath(dir) {
  var parts = dir.split('/');
  var crumb = new Array(parts.length);

  for (var i = 0; i < parts.length; i++) {
    var part = parts[i];

    if (part) {
      parts[i] = encodeURIComponent(part);
      crumb[i] = '<a href="' + escapeHtml(parts.slice(0, i + 1).join('/')) + '">' + escapeHtml(part) + '</a>';
    }
  }

  return crumb.join(' / ');
}
function htmlPath ( dir ) { var parts = dir . split ( '/' ) ; var crumb = new Array ( parts . length ) ; for ( var i = 0 ; i < parts . length ; i ++ ) { var part = parts [ i ] ; if ( part ) { parts [ i ] = encodeURIComponent ( part ) ; crumb [ i ] = '<a href="' + escapeHtml ( parts . slice ( 0 , i + 1 ) . join ( '/' ) ) + '">' + escapeHtml ( part ) + '</a>' ; } } return crumb . join ( ' / ' ) ; }
Map html `dir`, returning a linked path.
Map html dir returning a linked path .