A javascript library for working with objects
Create a power set from a set of values
Param | Type |
---|---|
input | array |
Example
import { powerset } from 'object-agent';
powerset([1, 2, 3]);
// => [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]
A javascript library for working with objects
Create a power set from a set of values
Param | Type |
---|---|
input | array |
Example
import { powerset } from 'object-agent';
powerset([1, 2, 3]);
// => [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]