I have also written a test to verify the code is doing the job correctly Please install node.js and run the following commands in the terminal to see the result
npm install
npm run test
and to see the visualization in the dev mode run the following command
npm run dev