JSPM

enum-powerset

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q53283F
  • License MIT

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

Package Exports

  • enum-powerset

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (enum-powerset) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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