combination-iterator
Iterate by combination values in a list
Install
$ npm install combination-iterator
Usage
Array
const combinationIterator = ; const it = ; itnext; // => { value: [ 'a', 'b' ], done: false }itnext; // => { value: [ 'a', 'c' ], done: false }itnext; // => { value: [ 'b', 'c' ], done: false }itnext; // => { value: undefined, done: true }
Object
const it = ; // Same bahavior as arraysitnext; // => { value: [ 'a', 'b' ], done: false }
License
MIT © Thibaut Vieux