# n-pair

> generate pairings for n-many sets

Latest version **0.0.0** (published 2013-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install n-pair
pnpm add n-pair
yarn add n-pair
bun add n-pair
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2013-08-01 |
| First published | 2013-08-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Halliday |
| Maintainers | substack |
| Keywords | pairing, tuple, combination, permutation, enumerate |

## Links

- npm: https://www.npmjs.com/package/n-pair
- Repository: https://github.com/substack/n-pair
- Issues: https://github.com/substack/n-pair/issues
- npm.io page: https://npm.io/package/n-pair

## Recent versions

- 0.0.0 (latest) — 2013-08-01

## README

# n-pair

generate pairings for n-many sets

[![testling badge](https://ci.testling.com/substack/n-pair.png)](https://ci.testling.com/substack/n-pair)

[![build status](https://secure.travis-ci.org/substack/n-pair.png)](http://travis-ci.org/substack/n-pair)

# example

``` js
var npair = require('n-pair');

npair([['a','b','c'],[1,2,3,4,5],['y','z']], function (x) {
    console.dir(x);
});
```

output:

```
[ 'a', 1, 'y' ]
[ 'a', 1, 'z' ]
[ 'a', 2, 'y' ]
[ 'a', 2, 'z' ]
[ 'a', 3, 'y' ]
[ 'a', 3, 'z' ]
[ 'a', 4, 'y' ]
[ 'a', 4, 'z' ]
[ 'a', 5, 'y' ]
[ 'a', 5, 'z' ]
[ 'b', 1, 'y' ]
[ 'b', 1, 'z' ]
[ 'b', 2, 'y' ]
[ 'b', 2, 'z' ]
[ 'b', 3, 'y' ]
[ 'b', 3, 'z' ]
[ 'b', 4, 'y' ]
[ 'b', 4, 'z' ]
[ 'b', 5, 'y' ]
[ 'b', 5, 'z' ]
[ 'c', 1, 'y' ]
[ 'c', 1, 'z' ]
[ 'c', 2, 'y' ]
[ 'c', 2, 'z' ]
[ 'c', 3, 'y' ]
[ 'c', 3, 'z' ]
[ 'c', 4, 'y' ]
[ 'c', 4, 'z' ]
[ 'c', 5, 'y' ]
[ 'c', 5, 'z' ]
```

# methods

``` js
var npair = require('n-pair')
```

## npair(sets, cb)

Pair each array in the array `sets` together in all the possible combinations,
calling `cb(pairing)` with each possible pairing.

# install

With [npm](https://npmjs.org) do:

```
npm install n-pair
```

# license

MIT

---
_Source: https://npm.io/package/n-pair · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
