smart-combin

0.0.1 • Public • Published

smart-combin

Get elements and generate all the possible combinations with they

Usage

npm install smart-combin
var smartCombin = require('smart-combin');
 
// From a total of seven elements i want all combinations of groups having 5 elements.
var allElements = [ "44", "16", "49", "53", "04", "52", "39" ];
var outputList = smartCombin.combine(allElements,5);
 
outputList.forEach( function (item) {
    console.log(item[0] + "," + item[1] + "," + item[2] + "," + item[3] + "," + item[4]);
});

Thanks

Readme

Keywords

Package Sidebar

Install

npm i smart-combin

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • juliogold