Skip to content

Conversation

@undermark5
Copy link

@undermark5 undermark5 commented Feb 28, 2021

This PR is a combination of #3 plus the changes that I reference in my comment.

The biggest changes are an increase in the number of test cases (I'm not sure if they are in the proper place code wise or implemented properly) and the ability to handle more complex inputs including fractions (e.g. "1-2 1/2 14.5 oz can tomato paste" -> {quantity: '1-2.5', unit: '14.5 ounce', ingredient: 'can tomato paste', minQty: '1', maxQty: '2.5'})

The multiplication is definitely an option, and maybe that could be a configuration option (or optional parameter), but I feel like people have an easier time doing multiplication than division.

Copy link
Owner

@nsafai nsafai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @undermark5 thanks for raising the PR. I do have some concerns with making this change because it can limit usability of the combine() feature and the future possibility of being able to convert units. Would love to get your thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants