⚠️ This is pre-release documentation for v3. For stable docs, visit v2.
Skip to content

@tmlmt/cooklang-parser / isAlternativesOnlyGroup

Function: isAlternativesOnlyGroup() ​

isAlternativesOnlyGroup(entry): entry is IngredientAlternativesOnlyGroup

Type guard to check if an ingredient quantity entry only carries alternatives (the ingredient has no quantity of its own).

Parameters ​

entry ​

IngredientQuantityGroup | IngredientQuantityAndGroup | IngredientAlternativesOnlyGroup

The quantity entry to check

Returns ​

entry is IngredientAlternativesOnlyGroup

true if the entry has neither quantity nor and