function throwIfDuplicates()

in scripts/generate-manifest.js [129:137]


function throwIfDuplicates(array, prop) {
  const uniqueNames = groupBy(array, prop);
  for (const key of Object.getOwnPropertyNames(uniqueNames)) {
    if (uniqueNames[key].length > 1) {
      throw new Error(`${key} has duplicate ${prop}`);
    }
  }
  return false;
}