Skip to content
forked from hallojoe/SpinText

A tool for generating random textual content from human written textual chains.

License

Notifications You must be signed in to change notification settings

5l1v3r1/SpinText

 
 

Repository files navigation

SpinText

A tool for generating text from word chains(optionally nested). Source is a refactored version of the TypeScript project found in this repo.

Install

npm install spintext --save

Use

var text = "{This is|It's} {Spin|Spin-text|Spin text}. {Enjoy!| You love it!}"
var engine = new SpinText.Engine(text);

console.log('Minimum number of words output will contain ', engine.countMinWords());
console.log('Maximum number of words output will contain ', engine.countMaxWords());
console.log('Possible number of variants output can be ', engine.countVariants());

console.log('Text result', engine.toString());

Try

A demo can be found here

Notes

  • 1.0.1 - Initial commit.
  • 1.0.2 - Fix issue with random/seed not beeing set properly.

About

A tool for generating random textual content from human written textual chains.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 76.0%
  • CSS 14.5%
  • HTML 7.1%
  • JavaScript 2.4%