src/utils.js
function createListOfDirectories(prev, dir) {
  return {
    ...prev,
    [dir.split(path.sep).pop()]: dir,
  }
}
function createListOfDirectories(prev, dir) {
  return {
    ...prev,
    [dir.split(path.sep).pop()]: dir,
  }
}
function createListOfDirectories ( prev , dir ) { return { ... prev , [ dir . split ( path . sep ) . pop ( ) ] : dir , } }
Reduce callback to reduce the list of directories
@param {object} prev
@param {array} dir
Reduce callback to reduce the list of directories