An implementation of the k-NN in NodeJS