Preparing search index...
    • Deduplicates ingredients by name for the validation queue.

      When the same ingredient name appears multiple times, this function:

      • Keeps the first occurrence's data (unit, note, similarItems if present)
      • If duplicates have the same unit, sums their quantities
      • If units differ, keeps only the first occurrence

      Type Parameters

      Parameters

      • ingredients: T[]

        Array of form ingredients to deduplicate (may include similarity info)

      Returns T[]

      Deduplicated array with quantities summed where applicable