Socket
Socket
Sign inDemoInstall

markov-strings

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markov-strings - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

8

index.js

@@ -13,3 +13,3 @@ 'use strict';

constructor(data, options = {}) {
this.data = this.formatData(data);
this.data = data;

@@ -61,2 +61,4 @@ this.corpus = undefined;

this.data = this.formatData(this.data);
this.corpus = {};

@@ -138,3 +140,4 @@ this.data.forEach(item => {

// Loop to build sentence
while (true) {
let limit = 0;
while (limit < max) {
const block = arr[arr.length - 1]; // Last value in array

@@ -159,2 +162,3 @@ const state = _.sample(corpus[block.words]);

}
limit++;
}

@@ -161,0 +165,0 @@ const scorePerWord = parseInt(score / arr.length);

{
"name": "markov-strings",
"version": "1.3.1",
"version": "1.3.2",
"description": "A Markov string generator",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -218,2 +218,10 @@ [![Build Status](https://travis-ci.org/scambier/markov-strings.svg?branch=master)](https://travis-ci.org/scambier/markov-strings)

### 1.3.2
- Fixed an infinite loop bug
- Performance improvement
### 1.3.1
- Updated README example
- Removed a useless line
### 1.3.0

@@ -220,0 +228,0 @@ - New feature: the generator now accepts arrays of objects, and tells the user which objects were used to build a sentence

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc