Louvain community detection algorithm for JavaScript