Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 1.81 KB

powerset.md

File metadata and controls

45 lines (36 loc) · 1.81 KB

Object Agent

A javascript library for working with objects

npm build coverage deps size vulnerabilities license


powerset(values) ⇒ Array

Create a power set from a set of values.

Param Type Description
values Array Initial set of values.

Example

import { powerset } from 'object-agent';

powerset([1, 2, 3]);
// => [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3]]