2.1.2 • Published 6 years ago

power-set-x v2.1.2

Weekly downloads
757
License
MIT
Repository
github
Last release
6 years ago

power-set-x

Calculates the Power Set of a set S.

module.exports(value)Array.<Array>

This method calculates the Power Set of value. Array sparseness is ignored.

In mathematics, the power set (or powerset) of any set S, written P(S), ℘(S), P(S), ℙ(S) or 2S, is the set of all subsets of S, including the empty set and S itself.

Kind: Exported function
Returns: Array.<Array> - The power set of value.
See: http://en.wikipedia.org/wiki/Power_set

ParamTypeDescription
valueArrayThe array like value to get the power set of.

Example

import powerSet from 'power-set-x';

console.log(powerSet([1, 2, 3])); // [[], [3], [2], [2, 3], [1], [1, 3], [1, 2], [1, 2, 3]]
2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.22

6 years ago

2.0.21

6 years ago

2.0.20

6 years ago

2.0.19

6 years ago

2.0.18

6 years ago

2.0.17

6 years ago

2.0.16

6 years ago

2.0.15

6 years ago

2.0.14

6 years ago

2.0.13

6 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.10

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago