permutation-stream

0.1.0 • Public • Published

node-permutation-stream

Create a stream of permutations

API

createPermutationStream(data[, opts])

Creates a stream of permutations of the data array. Arrays are emitted by the stream.

opts

  • min - minimum numbers of items in the output (default: 0)
  • max - maximum number of items to output (default: data.length)
var ps = require('permutation-stream');
var es = require('event-stream');
 
var s = ps.createPermutationStream(['hello', 'world']);
s.pipe(process.stdout);
 
> []
> ["hello"]
> ["world"]
> ["hello","world"]
> ["world","hello"]

Readme

Keywords

none

Package Sidebar

Install

npm i permutation-stream

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • rockinghorse