Preparing search index...

    Function scaleRecipeForSave

    • Scales recipe ingredients to default person count for database storage

      Normalizes recipes to a standard serving size before saving to ensure consistent storage. Scaling is reversed when loading for display.

      Parameters

      • recipe: recipeTableElement

        The recipe to scale

      • defaultPersons: number

        The default person count for normalization

      Returns recipeTableElement

      Recipe with scaled ingredient quantities and normalized persons