Generates random multi-paragraph content with customizable structure.
Creates content consisting of multiple paragraphs separated by double
newlines. Uses a triple-currying pattern to allow fine-grained control over
content structure: paragraphs count → sentences per paragraph → word
character lengths. Ideal for generating realistic-looking text content for
testing.
Example
// Generate with all defaults constarticle = RandomGenerator.content()()();
// Specific structure: 5 paragraphs, 15-25 sentences each, 4-8 char words constlongContent = RandomGenerator.content(5)(15, 25)(4, 8);
// Short content with brief sentences constshortContent = RandomGenerator.content(2)(5, 8)(2, 4);
// Generate blog post content constblogPost = { title:RandomGenerator.name(3), content:RandomGenerator.content(4)(10, 20)(3, 7), summary:RandomGenerator.paragraph(2)(5, 10) };
// Create test data for CMS constpages = Array.from({ length:10 }, () => ({ id:RandomGenerator.alphaNumeric(8), content:RandomGenerator.content(randint(2, 6))(8, 15)(4, 9) }));
Generates random multi-paragraph content with customizable structure.
Creates content consisting of multiple paragraphs separated by double newlines. Uses a triple-currying pattern to allow fine-grained control over content structure: paragraphs count → sentences per paragraph → word character lengths. Ideal for generating realistic-looking text content for testing.
Example