A javascript library for working with objects
Takes a set of values and creates an array of the unique sets of the values of a given length.
Param | Type | Default |
---|---|---|
array | array |
|
[length] | length |
2 |
Example
import { combo } from 'object-agent';
combo([1, 2, 3]);
// => [[1, 2], [1, 3], [2, 3]]
combo([1, 2, 3, 4], 3);
// => [[1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]