# js-permuter

> Generates all possible combinations for a set of possible attributes and values

Latest version **1.0.0** (published 2018-06-23) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install js-permuter
pnpm add js-permuter
yarn add js-permuter
bun add js-permuter
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-06-23 |
| First published | 2018-06-23 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 506.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David Valin |
| Maintainers | davidvalin |
| Keywords | permuter, combination, combinations, generate, combinations, permutations, parameter, permutations |

## Links

- npm: https://www.npmjs.com/package/js-permuter
- npm.io page: https://npm.io/package/js-permuter

## Recent versions

- 1.0.0 (latest) — 2018-06-23

## README

## Permuter

It generates all possible combinations receiving a set of possible attributes and values choosing one value per attribute at the time.

#### Example input:

```javascript
  const options = {
    optionA: ['A-value-1', 'A-value-2'],
    optionB: ['B-value-1', 'B-value-2', 'B-value-3'],
    optionC: ['C-value-1']
  }
```

#### Example output (all possible combinations):

```javascript
  [
     {
        "optionA": "A-value-1",
        "optionB": "B-value-1",
        "optionC": "C-value-1"
     },
     {
        "optionA": "A-value-1",
        "optionB": "B-value-2",
        "optionC": "C-value-1"
     },
     {
        "optionA": "A-value-1",
        "optionB": "B-value-3",
        "optionC": "C-value-1"
     },
     {
        "optionA": "A-value-2",
        "optionB": "B-value-1",
        "optionC": "C-value-1"
     },
     {
        "optionA": "A-value-2",
        "optionB": "B-value-2",
        "optionC": "C-value-1"
     },
     {
        "optionA": "A-value-2",
        "optionB": "B-value-3",
        "optionC": "C-value-1"
     }
  ]
```

##### Install

* (yarn) `yarn install js-permuter`
* (npm) `npm install js-permuter`

##### Use

```javascript
  import { permute } from "js-permuter";
  const options = {
    optionA: ['A-value-1', 'A-value-2'],
    optionB: ['B-value-1', 'B-value-2', 'B-value-3'],
    optionC: ['C-value-1']
  }
  const allCombinations = permute(options);
```

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