# variete

> Variete allows your to vary your copy (useful for descriptions, to avoid repetitive text)

Latest version **0.0.2** (published 2013-12-18) · MIT license · 0 weekly downloads

## Install

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

## 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.2 |
| Published | 2013-12-18 |
| First published | 2013-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Chris Hartwig |
| Maintainers | chrisdefourire |

## Links

- npm: https://www.npmjs.com/package/variete
- Repository: https://github.com/chrisDeFouRire/variete
- Issues: https://github.com/chrisDeFouRire/variete/issues
- npm.io page: https://npm.io/package/variete

## Recent versions

- 0.0.2 (latest) — 2013-12-18
- 0.0.1 — 2013-12-18

## README

Variété.js
==========

This NPM module (no dependencies!) will help you when you need to vary your copy randomly (think SEO).

## Duplicate descriptions? A thing of the past

Say you'd like to output a `description meta`, here's how to do it:

```
npm install variete
```

```JavaScript
var variete = require("variete");
var description = variete.parse('This {amazing|extraordinary|nice} module {will help me|already helps me} when I {need|have to} vary my copy.');
```

Now `description` contains a random string (among 3*2*2=12 variations) with the alternatives you've specified.

Note that you can't nest multiple alternatives.

It would be nice if we could seed the random number generator, so that result could depend on an page Id for instance...

This module is using a parser generated online at http://pegjs.majda.cz/online (nice!).

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