alder.js
function buildPrefix(depth, bottom) {
  if (!shouldIndent) {
    return ''
  }
  let prefix = bottom ? BOX_BOTTOM_LEFT : BOX_INTERSECTION
  let spacing = []
  let spaceIndex = 0
  while(spaceIndex < depth) {
    spacing[spaceIndex] = depths[spaceIndex] && !printJSX ? BOX_VERTICAL : EMPTY
    spaceIndex++
  }
  return printJSX ? spacing.join('') : spacing.join('') + prefix
}
function buildPrefix(depth, bottom) {
  if (!shouldIndent) {
    return ''
  }
  let prefix = bottom ? BOX_BOTTOM_LEFT : BOX_INTERSECTION
  let spacing = []
  let spaceIndex = 0
  while(spaceIndex < depth) {
    spacing[spaceIndex] = depths[spaceIndex] && !printJSX ? BOX_VERTICAL : EMPTY
    spaceIndex++
  }
  return printJSX ? spacing.join('') : spacing.join('') + prefix
}
function buildPrefix ( depth , bottom ) { if ( ! shouldIndent ) { return '' } let prefix = bottom ? BOX_BOTTOM_LEFT : BOX_INTERSECTION let spacing = [ ] let spaceIndex = 0 while ( spaceIndex < depth ) { spacing [ spaceIndex ] = depths [ spaceIndex ] && ! printJSX ? BOX_VERTICAL : EMPTY spaceIndex ++ } return printJSX ? spacing . join ( '' ) : spacing . join ( '' ) + prefix }
Pads filenames with either whitespace or box characters.
The depths map is used to track whether a character should
be whitespace or a vertical character. Typically it will
be whitespace if there are no other files at that depth
that need to be rendered.
@param {Number}  depth   the level at which this file/filder is nested
@param {Boolean} bottom  whether this is the last file in the folder
Pads filenames with either whitespace or box characters . The depths map is used to track whether a character should be whitespace or a vertical character . Typically it will be whitespace if there are no other files at that depth that need to be rendered .