This is a recipe ingredient parser. Strings like:
2 cups whole pecans (8 ounces), toasted and chopped into small pieces
Should end up as:
{
units: 2,
unit: 'cups',
item: 'whole pecans (8 ounces)',
info: 'toasted and chopped into small pieces'
}
Where all elements are optional except item name.
Requires jison: npm install jison