# mngen

> Mnemonic Word Generator. Generate words that are easy to read/say/understand/remember.

Latest version **1.1.0** (published 2017-11-21) · MIT license · 0 weekly downloads

## Install

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

Provides the command `mngen`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-11-21 |
| First published | 2015-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Even Brenna |
| Maintainers | evenbrenna |
| Keywords | cli-app, cli, bin, word, words, list, array, json, random, mnemonic, generator, word-list, password, name, names |

## Links

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

## Dependencies (1)

- [meow](https://npm.io/package/meow.md) ^3.3.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-11-21
- 1.0.0 — 2015-08-13
- 0.1.1 — 2015-08-12
- 0.1.0 — 2015-08-11

## README

# mnGen - Mnemonic Word Generator

Spits out random words from
[this](http://web.archive.org/web/20091003023606/http://tothink.com/mnemonic)
word list.

The word list consists of 1633 words that are easy to read, say, understand and
remember. They are also easy to distinguish from one another.

> "... suitable for transmission or storage by voice, handwriting, memorization
> or other non-computerized means."


You could use it to generate easy-to-remember passwords or name your servers.
Or dogs. Sometimes you just need a few top-notch words thrown at you.


## Install

`$ npm install --save mngen`


## Usage

```js

var mnGen = require('mngen');

mnGen.word();     // => 'tokyo'
mnGen.word(3);    // => "office-piano-fabric"

mnGen.list(3);    // => ['canoe', 'amigo', 'kermit']
mnGen.list(3, 2); // => ['fuji-visa', 'kilo-lemon', 'baker-echo']
mnGen.list(3, 2, '/'); // => ['fuji/visa', 'kilo/lemon', 'baker/echo']

mngen.list(2665057, 2); // => ERR: Max list length for [glue] === 2 is 2665056
```

## API


### .word([[glue], [separator]])

Returns: `String`

* Get a single random word
* Give an integer `glue` to make it a dash-joined combo of multiple words.
* Specify `separator` to customize separator between combos of multiple words.

```js
mnGen.word();  // => "eagle"
mnGen.word(3); // => "office-piano-fabric"
mnGen.word(3, '/'); // => "office/piano/fabric"
```


### .list([length, [glue], [separator]])

Returns: `Array`

* Get an array of random words.
* Default `length` is 100
* Array entries are unique.
* Specify `glue` to make entries dash-joined combos of multiple words.
* Specify `separator` to customize separator between combos of multiple words.
* Throws error if `length` > possible unique entries given `glue`
  (See Usage for example)

```js
nmGen.list();     // => An array of 100 unique words
mnGen.list(3);    // => ['canoe', 'amigo', 'kermit']
mnGen.list(3, 2); // => ['fuji-visa', 'kilo-lemon', 'baker-echo']
mnGen.list(3, 2, '/'); // => ['fuji/visa', 'kilo/lemon', 'baker/echo']
```



## CLI

`$ npm install --global mngen`

```shell
$ mngen
# => tokyo

$ mngen --glue 2
# => "english-legal"

$ mngen --glue 2 --separator /
# => "dexter/toronto"

$ mngen --list 3
# => canoe amigo kermit

$ mngen --list 2 --glue 3
# => oxford-soviet-rubber shave-deal-freddie

```
## TODO

* Add options:
   * Choose entry separator for list in cli (comma, newline, space, etc)
   * Custom word-lists

## Thanks

Inspired by [Sindre Sorhus](https://github.com/sindresorhus/yes-no-words)

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