parse-ingredient - v3.0.0
    Preparing search index...

    Interface Ingredient

    Ingredient properties.

    interface Ingredient {
        description: string;
        descriptionMeasurements?: DescriptionMeasurement[];
        isGroupHeader: boolean;
        meta?: IngredientMeta;
        quantity: number | null;
        quantity2: number | null;
        unitOfMeasure: string | null;
        unitOfMeasureID: string | null;
    }
    Index
    description: string

    The description

    descriptionMeasurements?: DescriptionMeasurement[]

    Quantity/unit pairs found within Ingredient.description, e.g. the 1 1/2-inch in "1 pound beef, cut into 1 1/2-inch cubes".

    Only included when the descriptionMeasurements option is true. Always an empty array for group headers, which are labels rather than measurements.

    isGroupHeader: boolean

    Whether the "ingredient" is actually a group header, e.g. "For icing:"

    Metadata about the parsed ingredient line. Only included when the includeMeta option is true.

    quantity: number | null

    The primary quantity (the lower quantity in a range, if applicable).

    Always a finite, non-negative number when not null — never negative, never NaN, never Infinity.

    quantity2: number | null

    The secondary quantity (the upper quantity in a range, or null if not applicable).

    Always null when Ingredient.quantity is null: a range with no lower bound is not a range. Subject to the same value constraints as quantity.

    unitOfMeasure: string | null

    The unit of measure

    unitOfMeasureID: string | null

    The unit of measure identifier