Skip to content

set-theory/powerset

Repository files navigation

Powerset operator for JavaScript. See docs.

⚠️ Depending on your environment, the code may require regeneratorRuntime to be defined, for instance by importing regenerator-runtime/runtime.

import {count} from '@iterable-iterator/count';
import {powerset as subsets} from '@set-theory/powerset';

const naturalNumbers = count(0n, 1n);

for (const subset of subsets(naturalNumbers)) ... ;

License Version Tests Dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size