The code was written in JavaScript using babel to leverage modern language features.
There is a very simple html UI where you can input the cart text description, click on the "Calculate" button and see the result below it.
Make sure to have node installed (I used the latest stable version, but versions higher than 10 should work), then follow these steps:
npm install
npm start
- Open
http://localhost:8080
on a modern browser
npm test