OptionaladditionalAn object that matches the format of unitsOfMeasure. Keys that match any in unitsOfMeasure will be used instead of the default, and any others will be added to the list of known units of measure when parsing ingredients.
OptionalallowIf true, ingredient descriptions that start with "of " will not be
modified. (By default, a leading "of " will be removed from all descriptions.)
OptionaldecimalThe character used as a decimal separator in numeric quantities.
Use "," for European-style decimal commas (e.g., "1,5" for 1.5).
OptionaldescriptionWords or patterns to strip from the beginning of ingredient descriptions. Commonly used to remove "of" from phrases like "1 cup of sugar". Strings are matched as whole words followed by whitespace. RegExp patterns are used as-is for more complex matching (e.g., French elisions).
OptionalgroupPatterns to identify group headers (e.g., "For the icing:"). Strings are treated as prefix patterns (matched at the start of the line followed by whitespace). RegExp patterns are used as-is for more complex matching.
OptionalignoreAn array of strings to ignore as units of measure when parsing ingredients.
OptionalincludeIf true, include a meta property on each ingredient containing
the original text, original index, and other metadata.
OptionalnormalizeConverts the unit of measure (unitOfMeasure property) of each
ingredient to its long, singular form. For example, "ml" becomes
"milliliter" and "cups" becomes "cup".
OptionalpartialWhen true, if normal whitespace-based parsing fails to identify a unit
of measure, the parser scans the description for known UOM strings
registered via additionalUOMs. Useful for CJK languages where words
are not separated by spaces.
OptionalrangeWords or patterns to identify ranges between quantities (e.g., "1 to 2", "1 or 2"). Strings are matched as whole words followed by whitespace. RegExp patterns are used as-is for more complex matching.
OptionaltrailingWords that indicate a trailing quantity extraction context. Used to identify patterns like "Juice of 3 lemons" or "Peels from 5 oranges".
Options available to parseIngredient.