UNPKG

@jeremyckahn/farmhand

Version:
10 lines (9 loc) 194 B
export function totalIngredientsInRecipe(recipe, amount = 1) { return ( amount * Object.values(recipe.ingredients).reduce( (acc, quantity) => acc + quantity, 0 ) ) }