The following files all contain material used for conversion. I was bored so I wrote this tiny program as a way to warm up before working on some PHP and Laravel stuff.
I used NodeJS. The code is provided below.
If you want the output, scroll to the last file at the bottom.
Tested on NodeJS 13.9.0!
Thanks for reading! :)
Feel bored? Optimize my code! :)
Twitter: @IngwiePhoenix
Here's a functional approach with one long chain 😊
Edit See updated answer below
Annotated: