# carrefour

> A library to generate the cartesian product of product variants.

Latest version **0.0.1** (published 2016-09-13) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install carrefour
pnpm add carrefour
yarn add carrefour
bun add carrefour
```

## 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.1 |
| Published | 2016-09-13 |
| First published | 2016-09-13 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >6.3.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Prabin Varma |
| Maintainers | material-dev |

## Links

- npm: https://www.npmjs.com/package/carrefour
- Repository: https://github.com/MaterialDev/carrefour
- Homepage: https://github.com/MaterialDev/carrefour#readme
- Issues: https://github.com/MaterialDev/carrefour/issues
- npm.io page: https://npm.io/package/carrefour

## Dependencies (1)

- [lodash.flatten](https://npm.io/package/lodash.flatten.md) ^4.4.0

## Recent versions

- 0.0.1 (latest) — 2016-09-13

## README

# carrefour

[ ![Codeship Status for MaterialDev/carrefour](https://codeship.com/projects/50661570-5b73-0134-b71c-2ef6935e15e3/status?branch=master)](https://codeship.com/projects/173416)

Use the `carrefour` library to generate the Product Variant options for the Material platform based on the values of the different variant groups.

## Installation and Usage

Using npm:

```
$ {sudo -H} npm i -g npm
$ npm i --save @material-dev/carrefour
```

In Node.js:
```javascript
const carrefour = require('carrefour');

const variantOptions = carrefour.buildVariants(['Red', 'Blue'], ['S', 'M', 'L']);
/*
[
  { variants: ['Red', 'S'], isShopperVisible: true },
  { variants: ['Red', 'M'], isShopperVisible: true },
  { variants: ['Red', 'L'], isShopperVisible: true },
  { variants: ['Blue', 'S'], isShopperVisible: true },
  { variants: ['Blue', 'S'], isShopperVisible: true },
  { variants: ['Blue', 'S'], isShopperVisible: true },
]
*/

```


## To run the code locally:

1. Confirm that node v6 and git are installed

2. Clone the repo
```
git clone git@github.com:MaterialDev/carrefour.git
```

3. Install dependencies
```
npm install
```

4. Run the tests
```
npm test
```

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