0.2.1 • Published 5 years ago

@pinkkis/lorem-ipschwing v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Lorem Ipschwing

License: MIT GitHub package.json version

Wayne's World Lorem Ipsum Generator

Usage

import { Lorem, defaultConfig } from "@pinkkis/lorem-ipschwing";

const lorem = new Lorem(/*defaultConfig*/);

const sentence = lorem.generateSentence();
const paragraph = lorem.generateParagraph();

You can override default config values:

const defaultConfig = {
	sentenceLength: {
		min: 4,
		max: 8
	},
	paragraphLength: {
		min: 4,
		max: 8
	},
	ww1: true,
	ww2: true,
	useLongSentences: true,
	startWithLoremIpsum: true,
	sentenceAddThreshold: 0.6 // Math.random() > threshold
};

Noting that if useLongSentences is used, it creates much longer sentences


Wayne's World and Wayne's World 2 are the property of NBCUniversal and Paramount Pictures