function removeDuplicateObjectsFromArray()

in github/changed-files/git-changed-files/src/fetchGitStatus.js [22:26]


function removeDuplicateObjectsFromArray(finalList, nodeName) {
  return finalList.filter((obj, index, arrayList) => {
    return arrayList.map((mapObj) => mapObj[nodeName]).indexOf(obj[nodeName]) === index;
  });
}