ingredients-parser
Parses ingredient strings into units, amounts and ingredient names. Forked from the now dead Ingreedyjs project.
Installation
npm install ingredients-parser --save
Usage
var parser = ; var result = parser;resultamount //=> '500'resultunit //=> 'ml'resultingredient //=> "milk" result = parser;resultamount //=> 'two'resultunit //=> 'kg'resultingredient //=> "all purpouse flour"
Contributing
If you wish to change the parser you need to change rules.pegjs
file. The pegjs-generated.js
file is generated by PEG.js.
Building
make build
Testing
make test