Skip to content

incessantmeraki/enum-powerset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published