Clustering algorithms implemented in Javascript for Node.js and the browser