1.0.0 • Published 6 years ago

enum-powerset v1.0.0

Weekly downloads
118
License
MIT
Repository
github
Last release
6 years ago

enum-powerset

generates all possible subsets (powerset) of elements in a given array

Build Status

Usage

Example

  //generate all possible ways in which alice bob and eve can be selected

  var powerSet = require('enum-powerset')
  
  var arr = ['alice', 'bob', 'eve']

  var result = powerSet(arr) 
  console.log(result)

API

require('enum-powerset')(arr)

returns an array containing all possible selections of elements in given array arr

License

MIT