enum-nck
v1.0.0
Published
generates all possible subsets with size k from given array
Downloads
2
Maintainers
Readme
enum-nck
generates all possible subsets with size k from given array
Usage
Example
//generate all 2 members team from 3 players
var nck = require('enum-nck')
var arr = ['alice', 'bob', 'eve']
var result = nck(arr, 2)
console.log(result)
API
require('enum-nck')(arr, choose)
returns an array containing all possible selections of size choose from elements in array arr
License
MIT