Comy - a sort of glorified dice-throwing
Introduction
Combinatorial algorithms are computational procedures which are designed to help solve combinatorial problems.
Install
$ npm install comy
Usage
const comy = ; // Specific example:const priorityGroups = ;const arr = name: "Michael" priority: 1 name: "Murphy" priority: 2 name: "Capone" priority: 3 name: "Donnie" priority: 1 name: "Koby" priority: 2 name: "Felis" priority: 3 ; //Split the arr into 2 balanced groups by priorityconsole;/* Possible output:[ [ { name: 'Donnie', priority: 1 }, { name: 'Koby', priority: 2 }, { name: 'Felis', priority: 3 } ], [ { name: 'Michael', priority: 1 }, { name: 'Murphy', priority: 2 }, { name: 'Capone', priority: 3 } ]]*/
Methods
pickNumbers:anypickRandom:anypickHexColor:stringpriorityGroups:anygroups:anygenerateString:string