Preparing search index...
    • Converts raw and parsed ingredient data into application format.

      Prioritizes pre-parsed ingredients when available. Falls back to string parsing for raw ingredients. Optionally attaches usage notes from ingredient groups.

      Parameters

      • rawIngredients: string[]

        Raw ingredient strings from scraper

      • parsedIngredients: undefined | null | ParsedIngredient[]

        Pre-parsed structured ingredients (may be null)

      • ingredientGroups: undefined | null | IngredientGroup[] = null

        Grouped ingredients with purpose/notes (may be null)

      • patterns: IgnoredIngredientPatterns = DEFAULT_PATTERNS

        Patterns for ingredients to skip during parsing

      Returns ConvertedIngredients

      Converted ingredients and list of skipped unparseable ingredients