
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@mediavine/recipe-ingredient-parser
Advanced tools
Natural language parser for recipes and ingredient lists
Natural language parser for recipes and lists of ingredients. Can parse a string into an object and also combine an array of these ingredient objects.
npm install recipe-ingredient-parser or yarn add recipe-ingredient-parser
import { parse } from 'recipe-ingredient-parser';
And then use on a string, for example:
parse('1 teaspoon basil');
Will return an object:
{
quantity: 1,
unit: 'teaspoon',
ingredient: 'basil'
};
combine([{
quantity: 1,
unit: 'teaspoon',
ingredient: 'basil'
},
{
quantity: 1,
unit: 'teaspoon',
ingredient: 'basil'
}]);
Will return
[{
quantity: 2,
unit: 'teaspoon',
ingredient: 'basil'
}]
Will also correctly parse unicode fractions into the proper amount
FAQs
Natural language parser for recipes and ingredient lists
The npm package @mediavine/recipe-ingredient-parser receives a total of 3 weekly downloads. As such, @mediavine/recipe-ingredient-parser popularity was classified as not popular.
We found that @mediavine/recipe-ingredient-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.