src/index.js
function render (files, baseDir, renderLabelFn, options = {}) {
  baseDir = baseDir.replace(/\/$/, '/')
  const strippedFiles = files.map(file => {
    /* istanbul ignore else: Else-case should never happen */
    if (file.lastIndexOf(baseDir, 0) === 0) {
      return file.substr(baseDir.length)
    }
    /* istanbul ignore next: Should never happen */
    throw new Error('Basedir ' + baseDir + ' must be a prefix of ' + file)
  })
  const rootNode = treeFromPaths(strippedFiles, baseDir, renderLabelFn, options)
  const condensed = condense(rootNode)
  return archy(condensed)
}
function render (files, baseDir, renderLabelFn, options = {}) {
  baseDir = baseDir.replace(/\/$/, '/')
  const strippedFiles = files.map(file => {
    /* istanbul ignore else: Else-case should never happen */
    if (file.lastIndexOf(baseDir, 0) === 0) {
      return file.substr(baseDir.length)
    }
    /* istanbul ignore next: Should never happen */
    throw new Error('Basedir ' + baseDir + ' must be a prefix of ' + file)
  })
  const rootNode = treeFromPaths(strippedFiles, baseDir, renderLabelFn, options)
  const condensed = condense(rootNode)
  return archy(condensed)
}
function render ( files , baseDir , renderLabelFn , options = { } ) { baseDir = baseDir . replace ( / \/$ / , '/' ) const strippedFiles = files . map ( file => { /* istanbul ignore else: Else-case should never happen */ if ( file . lastIndexOf ( baseDir , 0 ) === 0 ) { return file . substr ( baseDir . length ) } /* istanbul ignore next: Should never happen */ throw new Error ( 'Basedir ' + baseDir + ' must be a prefix of ' + file ) } ) const rootNode = treeFromPaths ( strippedFiles , baseDir , renderLabelFn , options ) const condensed = condense ( rootNode ) return archy ( condensed ) }
Renders a list of files like

```
['abc/cde/efg/', 'abc/cde/abc', 'abc/zyx']
```

as ascii-art tree (using [archy](https://www.npmjs.com/package/archy))

@param {string[]} files an array of sorted file paths relative to `parent`
@param {string} baseDir the root path of the tree.
@param {function({parent:string, file:string, explicit: boolean}):string} renderLabelFn function that renders the label
of a node. It receives the parent and a filenpath as parameters.
@param {object=} options optional parameters
@param {string=} options.label the label of the root node (default: '')

@returns {string} am ascii-art tree
@access public
Renders a list of files like