Preparing search index...

    Function cleanIngredientName

    • Removes parenthetical qualifiers from an ingredient name.

      Parameters

      • name: string

        Raw ingredient name (may contain qualifiers)

      Returns string

      Name with all (...) segments stripped and trimmed

      cleanIngredientName('Tomatoes (canned)') // 'Tomatoes'
      cleanIngredientName('Chicken (boneless) (skinless)') // 'Chicken'