enum-powerset

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i enum-powerset

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • incessantmeraki