JSPM

powerset-stream

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q31612F

Streams all the possible combinations of subsets of the set given in input

Package Exports

  • powerset-stream

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 (powerset-stream) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

powerset-stream

A readable stream that generates all the possible combinations of subsets of the set given in input.

NPM version Build Status Downloads

Install

Node.js

npm install powerset-stream

Usage

powersetStream([1, 2, 3])
  .on('data', function(comb) {
    console.log(comb);
  });

/* Prints:

[ 1 ]
[ 2 ]
[ 3 ]
[ 1, 2 ]
[ 1, 3 ]
[ 2, 3 ]
[ 1, 2, 3 ]

*/

Credits