code: function (map) {
              var didSomething = false;
              _.forEach(map, function (arr, key) {
                  // length > 1 means we have duplicates that need to be resolved
                  if (arr.length > 1) {
                      arr.forEach(function (index) {
                          if (filePaths[index].length !== 0) {
                              displayPaths[index] = filePaths[index].pop() + "/" + displayPaths[index];
                              didSomething = true;
  
                              if (!map[displayPaths[index]]) {
                                  map[displayPaths[index]] = [index];
                              } else {
                                  map[displayPaths[index]].push(index);
                              }
                          }
                      });
                  }
                  delete map[key];
              });
              return didSomething;
          }
docs: This function is used to loop through map and resolve duplicate names