An implementation of kmeans in Node.js