Catalog npm
PACKAGE EXPLORERView in registry

@0x77/markov-typescript

npm

A Markov Chain library written in Typescript.

chaingeneratormarkovrandomtypescript
Versions collected1
Direct dependencies12From release 1.2.1
Last observed20 Oct, 22:39 UTC

README

Current package documentation

markov-typescript

A Markov Chain library written in TypeScript, inspired by otac0n/markov and chriscore/MarkovSharp.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installing

yarn add @0x77/markov-typescript

Usage

Import types from package:

import * as Markov from "@0x77/markov-typescript";

Code sample

const chain = new MarkovChain<string>(2);
chain.learn("the quick brown fox jumped over the lazy dog".split(" "));
chain.learn("the quick brown dog jumped over the lazy cat".split(" "));
chain.learn("the quick brown cat jumped over the lazy fox".split(" "));
for (let x = 0; x < 10; x++) {
  console.log(chain.walk().join(" "));
}

Building the project

yarn build

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Tom Wolfe - Initial work - trwolfe13
  • Mikahil Marynenko - Dependencies, package optimizations - trwolfe13

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • Thanks to otac0n for the original .NET codebase.
  • Thanks to chriscore for the second reference and unit tests.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.2.1Registry latest25 Sept 202012

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0x77dev/markov-typescript

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:39 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2867904c3a3d3391c6969decf54e65867ca45be1087d6186b61e185748ce3e4c