1.1.3 • Published 4 years ago

mattophobia v1.1.3

Weekly downloads
7
License
ISC
Repository
github
Last release
4 years ago

💢 Mattophobia

NPM version NPM downloads Build status Dependencies Coverage Status

Generate Mattophobia-like sentences

💾 Installation

The package is on the NPM registry as mattophobia. Simply install it with your NPM client of choice.

🔧 Usage

First, import the module:

const mattophobia = require('mattophobia')

mattophobia() is an ES6 generator function that creates an IterableIterator<string>. It returns an infinite series of Mattophobia strings.

💉 Options

You can pass in an object with options when instantiating the generator.

OptionTypeDefaultDescription
ingsstring[]see constants.tsWords ending with -ing for the generator
swearsstring[]see constants.tsProfanity for the generator
standalonestring[]see constants.tsStandalone phrases for the generator
minWordsnumber4Minimum number of words per sentence
maxWordsnumber18Maximum number of words per sentence
maxLengthnumber140Maximum length of the string. Set to < 1 for no limit.

📝 Example

// Import the module
const mattophobia = require('mattophobia')

// Limit to tweet length
const generator = mattophobia({ maxLength: 280 })
console.log(generator.next().value)

💙 Special Thanks

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago