jordan-enev/random-grouping

how to use it?

OneMorea opened this issue · 1 comments

how to run it ?Are there any other profiles?

Hello,

In order to use the library it in your project, you have to manually include it, depending on your js building process. There isn't an npm module yet, because it was an experimental library.

However, if you have a simple html page, you can download it and include it as follow (while there is no npm module):

<script src='script.js'></script>

And use it later:

// [ [5,3], [2,4], [6,1] ]
randomGrouping([1,2,3,4,5,6], {chunks: 2})

// [ [5,3,2], [4,6,1] ]
randomGrouping([1,2,3,4,5,6], {groups: 2})

Please read the library's README for more details.