# @set-theory/cartesian-product

> Cartesian product for JavaScript

Latest version **2.0.2** (published 2021-12-20) · AGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @set-theory/cartesian-product
pnpm add @set-theory/cartesian-product
yarn add @set-theory/cartesian-product
bun add @set-theory/cartesian-product
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2021-12-20 |
| First published | 2021-04-27 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 469 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | make-github-pseudonymous-again |
| Maintainers | aureooms |
| Keywords | cartesian, diagonal, product, set, theory |

## Links

- npm: https://www.npmjs.com/package/@set-theory/cartesian-product
- Repository: https://github.com/set-theory/cartesian-product
- Homepage: https://set-theory.github.io/cartesian-product
- Issues: https://github.com/set-theory/cartesian-product/issues
- npm.io page: https://npm.io/package/@set-theory/cartesian-product

## Dependencies (8)

- [@data-structure/deque](https://npm.io/package/@data-structure/deque.md) ^9.0.1
- [@iterable-iterator/map](https://npm.io/package/@iterable-iterator/map.md) ^1.0.1
- [@iterable-iterator/iter](https://npm.io/package/@iterable-iterator/iter.md) ^1.0.1
- [@iterable-iterator/list](https://npm.io/package/@iterable-iterator/list.md) ^1.0.1
- [@iterable-iterator/next](https://npm.io/package/@iterable-iterator/next.md) ^2.0.1
- [@iterable-iterator/count](https://npm.io/package/@iterable-iterator/count.md) ^1.0.1
- [@iterable-iterator/cycle](https://npm.io/package/@iterable-iterator/cycle.md) ^1.0.0
- [@iterable-iterator/reversed](https://npm.io/package/@iterable-iterator/reversed.md) ^1.0.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2021-12-20
- 2.0.1 — 2021-07-15
- 2.0.0 — 2021-07-14
- 1.0.2 — 2021-05-05
- 1.0.0 — 2021-04-30
- 0.0.4 — 2021-04-27
- 0.0.3 — 2021-04-27
- 0.0.2 — 2021-04-27
- 0.0.1 — 2021-04-27
- 0.0.0 — 2021-04-27

## README

:heavy_multiplication_x: [@set-theory/cartesian-product](https://set-theory.github.io/cartesian-product)
==

Cartesian product for JavaScript.
See [docs](https://set-theory.github.io/cartesian-product/index.html).

> :warning: Depending on your environment, the code may require
> `regeneratorRuntime` to be defined, for instance by importing
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).

```js
import { product } from '@set-theory/cartesian-product' ;
product( [ "ABCD" , "xy" ] , 1 ) ; // Ax Ay Bx By Cx Cy Dx Dy

import { range } from '@iterable-iterator/range' ;
product( [ range( 2 ) ] , 3 ) ; // 000 001 010 011 100 101 110 111

product( [ range( 4 ) , range( 4 ) ] ) ; // 00 01 02 03 10 11 12 13 20 21 ...

import { diagonal } from '@set-theory/cartesian-product' ;
diagonal( range( 4 ) , range( 4 ) ) ; // 00 01 10 02 11 20 03 12 21 30 ...

import { count } from '@iterable-iterator/count' ;
product( [count( ), count( )] ) ; // Loops forever without yielding. DO NOT DO THIS
diagonal( count( ), count( ) ) ; // 00 01 10 02 11 20 03 12 21 30 ...
import { _product } from '@set-theory/cartesian-product' ;
_product( [count( ), count( )], 0, 2 ) ; // 00 01 02 03 04 05 06 07 08 09 ...
```

[![License](https://img.shields.io/github/license/set-theory/cartesian-product.svg)](https://raw.githubusercontent.com/set-theory/cartesian-product/main/LICENSE)
[![Version](https://img.shields.io/npm/v/@set-theory/cartesian-product.svg)](https://www.npmjs.org/package/@set-theory/cartesian-product)
[![Tests](https://img.shields.io/github/workflow/status/set-theory/cartesian-product/ci:test?event=push&label=tests)](https://github.com/set-theory/cartesian-product/actions/workflows/ci:test.yml?query=branch:main)
[![Dependencies](https://img.shields.io/david/set-theory/cartesian-product.svg)](https://david-dm.org/set-theory/cartesian-product)
[![Dev dependencies](https://img.shields.io/david/dev/set-theory/cartesian-product.svg)](https://david-dm.org/set-theory/cartesian-product?type=dev)
[![GitHub issues](https://img.shields.io/github/issues/set-theory/cartesian-product.svg)](https://github.com/set-theory/cartesian-product/issues)
[![Downloads](https://img.shields.io/npm/dm/@set-theory/cartesian-product.svg)](https://www.npmjs.org/package/@set-theory/cartesian-product)

[![Code issues](https://img.shields.io/codeclimate/issues/set-theory/cartesian-product.svg)](https://codeclimate.com/github/set-theory/cartesian-product/issues)
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/set-theory/cartesian-product.svg)](https://codeclimate.com/github/set-theory/cartesian-product/trends/churn)
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/set-theory/cartesian-product/main.svg)](https://codecov.io/gh/set-theory/cartesian-product)
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/set-theory/cartesian-product.svg)](https://codeclimate.com/github/set-theory/cartesian-product/trends/technical_debt)
[![Documentation](https://set-theory.github.io/cartesian-product/badge.svg)](https://set-theory.github.io/cartesian-product/source.html)
[![Package size](https://img.shields.io/bundlephobia/minzip/@set-theory/cartesian-product)](https://bundlephobia.com/result?p=@set-theory/cartesian-product)

---
_Source: https://npm.io/package/@set-theory/cartesian-product · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
