# markov-chain-js

> A Markov Chain generator class for text

Latest version **1.0.2** (published 2017-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install markov-chain-js
pnpm add markov-chain-js
yarn add markov-chain-js
bun add markov-chain-js
```

## 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.0.2 |
| Published | 2017-07-12 |
| First published | 2017-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.4.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Thomas Alrek |
| Maintainers | thomas-alrek |

## Links

- npm: https://www.npmjs.com/package/markov-chain-js
- Repository: https://github.com/thomas-alrek/markov-chain-js
- Homepage: https://github.com/thomas-alrek/markov-chain-js#readme
- Issues: https://github.com/thomas-alrek/markov-chain-js/issues
- npm.io page: https://npm.io/package/markov-chain-js

## Recent versions

- 1.0.2 (latest) — 2017-07-12
- 1.0.1 — 2017-07-12
- 1.0.0 — 2017-07-12

## README

# MarkovChain

This is a JS implementation of a Markov Chain text generator.

It can be used for implementing name generators, placeholder text and more.

See the [documentation](DOCUMENTATION.md) for detailed instructions.

If you want to contribute, please check out the [contribution guide](CONTRIBUTING.md).

# Installation

If you are running in a node environment, you can install the pacakge from NPM.

```bash
npm install markov-chain-js
```

If you just want to use it standalone, you can use the compiled and minified version in dist.

# Usage

```javascript
const MarkovChain = require('markov-chain-js')

const options = {
  source: `Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Integer nec odio.
Praesent libero.
Sed cursus ante dapibus diam.
Sed nisi.
Nulla quis sem at nibh elementum imperdiet.`,
  order: 3
}

let myGenerator = new MarkovChain(options)

myGenerator.generate() // Outputs e.g: 'Sed nibh element libero'
```

Licensed under the [MIT](LICENSE) license.


Copyright Thomas Alrek &copy; 2017

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