Module to generate random texts and words.Overview
Generate dummy content using traditional faux-Latin lorem ipsum (in other locales to en, alternative words may be used).In order of increasing size you can generate a single {{$lorem.word}}, multiple {{$lorem.words}}, a {{$lorem.sentence}}, multiple {{$lorem.sentences}}, {{$lorem.lines}} separated by newlines, one {{$lorem.paragraph}}, or multiple {{$lorem.paragraphs}}.The generic {{$lorem.text}} method can be used to generate some text between one sentence and multiple paragraphs, while {{$lorem.slug}} generates an URL-friendly hyphenated string.
lines#
Generates the given number lines of lorem separated by '\n'.| Name | Type | Default | Description |
|---|
| max | number | | The maximum number of lines to generate. |
| min | number | | The minimum number of lines to generate. |
paragraph#
Generates a paragraph with the given number of sentences.| Name | Type | Default | Description |
|---|
| max | number | | The maximum number of sentences to generate. |
| min | number | | The minimum number of sentences to generate. |
paragraphs#
Generates the given number of paragraphs.| Name | Type | Default | Description |
|---|
| max | number | | The maximum number of paragraphs to generate. |
| min | number | | The minimum number of paragraphs to generate. |
| separator | string | '\n' | The separator to use. |
sentence#
Generates a space separated list of words beginning with a capital letter and ending with a period.| Name | Type | Default | Description |
|---|
| max | number | | The maximum number of words to generate. |
| min | number | | The minimum number of words to generate. |
sentences#
Generates the given number of sentences.| Name | Type | Default | Description |
|---|
| max | number | | The maximum number of sentences to generate. |
| min | number | | The minimum number of sentences to generate. |
| separator | string | '\n' | The separator to add between sentences. |
slug#
Generates a slugified text consisting of the given number of hyphen separated words.| Name | Type | Default | Description |
|---|
| max | number | | The maximum number of words to generate. |
| min | number | | The minimum number of words to generate. |
text#
Generates a random text based on a random lorem method.
word#
Generates a word of a specified length.| Name | Type | Default | Description |
|---|
| length | number | { min: number; max: number; } | 1 | The expected length of the word. |
| max | number | | The maximum number of word to generate. |
| min | number | | The minimum number of word to generate. |
| strategy | 'fail' | 'closest' | 'shortest' | 'longest' | 'any-length' | 'any-length' | The strategy to apply when no words with a matching length are found. Available error handling strategies:- fail: Throws an error if no words with the given length are found.- shortest: Returns any of the shortest words.- closest: Returns any of the words closest to the given length.- longest: Returns any of the longest words.- any-length: Returns a word with any length. |
words#
Generates a space separated list of words.| Name | Type | Default | Description |
|---|
| max | number | | The maximum number of words to generate. |
| min | number | | The minimum number of words to generate. |
Modified at 2025-06-25 07:57:16