content(
props?: Partial<
{
paragraphs: number;
sentenceMax: number;
sentenceMin: number;
wordMax: number;
wordMin: number;
},
>,
): string
Optionalprops: Partial<Optional configuration object with paragraph, sentence, and word parameters
A string containing the generated multi-paragraph content
// Generate with all defaults
const article = RandomGenerator.content();
// Specific structure: 5 paragraphs, 15-25 sentences each, 4-8 char words
const longContent = RandomGenerator.content({
paragraphs: 5,
sentenceMin: 15,
sentenceMax: 25,
wordMin: 4,
wordMax: 8,
});
// Short content with brief sentences
const shortContent = RandomGenerator.content({
paragraphs: 2,
sentenceMin: 5,
sentenceMax: 8,
wordMin: 2,
wordMax: 4,
});
// Generate blog post content
const blogPost = {
title: RandomGenerator.name(3),
content: RandomGenerator.content({
paragraphs: 4,
sentenceMin: 10,
sentenceMax: 20,
wordMin: 3,
wordMax: 7,
}),
summary: RandomGenerator.paragraph({ sentences: 2 }),
};
// Create test data for CMS
const pages = Array.from({ length: 10 }, () => ({
id: RandomGenerator.alphaNumeric(8),
content: RandomGenerator.content({
paragraphs: randint(2, 6),
sentenceMin: 8,
sentenceMax: 15,
}),
}));
contracts/common.md#principled-implementation The content has three to eight paragraphs by default, each containing ten to forty space-separated words of one to seven lowercase letters, joined by blank lines. The legacy sentence-named options count words, not grammatical sentences.
contracts/common.md#clear-and-simple-design One expression over paragraph, with five optional numbers.
Generates random multi-paragraph content with customizable structure.
Creates content consisting of multiple paragraphs separated by double newlines. Accepts an optional configuration object to control content structure including paragraph count, sentences per paragraph, and word character lengths. Ideal for generating realistic-looking text content for testing.
Processing cost: Every paragraph is generated once; time and temporary space scale with the total output characters and paragraph/word counts.