Skip to main content

lorem Domain

The lorem domain maps domain keywords to underlying faker implementations.

Faker Documentation

Methods

lorem.lines

Generates the given number lines of lorem separated by '\n'.

ArgTypeRequiredDescription
minnumbernoMinimum bound used when generating a value.
maxnumbernoMaximum bound used when generating a value.
lineCountnumbernoExact number of lines to generate.
lineCountMaxnumbernoThe maximum number of lines to generate.
lineCountMinnumbernoThe minimum number of lines to generate.

Examples:

lorem.lines()
lorem.lines(min=1, max=1, lineCount=1, lineCountMax=1, lineCountMin=1)

Example return values:

  • Illum qui ocer creptio. Antepono aro vergo voluptatem acervus compono apud.

lorem.paragraph

Generates a paragraph with the given number of sentences.

ArgTypeRequiredDescription
minnumbernoMinimum bound used when generating a value.
maxnumbernoMaximum bound used when generating a value.
sentenceCountnumbernoNumber of sentences to generate.
sentenceCountMaxnumbernoThe maximum number of sentences to generate.
sentenceCountMinnumbernoThe minimum number of sentences to generate.

Examples:

lorem.paragraph()
lorem.paragraph(min=1, max=1, sentenceCount=1, sentenceCountMax=1, sentenceCountMin=1)

Example return values:

  • Quisquam dolorum modi quae atque.

lorem.paragraphs

Generates the given number of paragraphs.

ArgTypeRequiredDescription
minnumbernoMinimum bound used when generating a value.
maxnumbernoMaximum bound used when generating a value.
paragraphCountnumbernoNumber of paragraphs to generate.
separatorstringnoSeparator inserted between generated items.
paragraphCountMaxnumbernoThe maximum number of paragraphs to generate.
paragraphCountMinnumbernoThe minimum number of paragraphs to generate.

Examples:

lorem.paragraphs()
lorem.paragraphs(min=1, max=1, paragraphCount=1, separator="-", paragraphCountMax=1, paragraphCountMin=1)

Example return values:

  • Primus paragraphus.\n\nSecundus paragraphus.

lorem.sentence

Generates a space separated list of words beginning with a capital letter and ending with a period.

ArgTypeRequiredDescription
minnumbernoMinimum bound used when generating a value.
maxnumbernoMaximum bound used when generating a value.
wordCountnumbernoNumber of words to generate.
wordCountMaxnumbernoThe maximum number of words to generate.
wordCountMinnumbernoThe minimum number of words to generate.

Examples:

lorem.sentence()
lorem.sentence(min=1, max=1, wordCount=1, wordCountMax=1, wordCountMin=1)

Example return values:

  • Auctor cum deorsum attero cum tergo aut.

lorem.sentences

Generates the given number of sentences.

ArgTypeRequiredDescription
minnumbernoMinimum bound used when generating a value.
maxnumbernoMaximum bound used when generating a value.
sentenceCountnumbernoNumber of sentences to generate.
separatorstringnoSeparator inserted between generated items.
sentenceCountMaxnumbernoThe maximum number of sentences to generate.
sentenceCountMinnumbernoThe minimum number of sentences to generate.

Examples:

lorem.sentences()
lorem.sentences(min=1, max=1, sentenceCount=1, separator="-", sentenceCountMax=1, sentenceCountMin=1)

Example return values:

  • Vicissitudo amet candidus. Urbanus magni carbo artificiose tenus at ambulo.

lorem.slug

Generates a slugified text consisting of the given number of hyphen separated words.

ArgTypeRequiredDescription
minnumbernoMinimum bound used when generating a value.
maxnumbernoMaximum bound used when generating a value.
wordCountnumbernoNumber of words to generate.
wordCountMaxnumbernoThe maximum number of words to generate.
wordCountMinnumbernoThe minimum number of words to generate.

Examples:

lorem.slug()
lorem.slug(min=1, max=1, wordCount=1, wordCountMax=1, wordCountMin=1)

Example return values:

  • dolore-accusator-atqui

lorem.text

Generates a random text based on a random lorem method.

No parameters.

Examples:

lorem.text()

Example return values:

  • A short sample text generated from lorem.

lorem.word

Generates a word of a specified length.

ArgTypeRequiredDescription
minnumbernoMinimum word length when generating a ranged length.
maxnumbernoMaximum word length when generating a ranged length.
lengthnumbernoExact word length to generate.
strategystringnoThe 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.

Examples:

lorem.word()
lorem.word(min=1, max=1, length=1, strategy="any-length")

Example return values:

  • cumque

lorem.words

Generates a space separated list of words.

ArgTypeRequiredDescription
minnumbernoMinimum bound used when generating a value.
maxnumbernoMaximum bound used when generating a value.
wordCountnumbernoNumber of words to generate.
wordCountMaxnumbernoThe maximum number of words to generate.
wordCountMinnumbernoThe minimum number of words to generate.

Examples:

lorem.words()
lorem.words(min=1, max=1, wordCount=1, wordCountMax=1, wordCountMin=1)

Example return values:

  • desidero conforto decimus