Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 808 Bytes

README.md

File metadata and controls

30 lines (25 loc) · 808 Bytes

markov-catena

String generator based on Markov process

Installation

npm install markov-catena

Simple example

import  from 'markov-catena'
// or const mс = require('markov-catena')

const generator = new .StringGenerator(['hello, world', 'world is mine'])

for (let _ in [...Array(5)]) console.log(generator.generateString())
// will generate something like:
//
// 'hello, world'
// 'world'
// 'hello, world is mine'
// 'world'
// 'hello, world' 

More examples can be found here

Features

  • Easy to use
  • Result validating (also built-in validators).
  • Result formatting (also built-in formatters). Example