Hey Product Hunt!
I worked on this a little while ago for a few different projects, it's basically just a free open-source version typescript of k-means clustering. It may be of use to you!
If you appreciate it, feel free to star the repo for future reference.