Returns a random adjective.
Optional
options: The expected length of the word or the options to use.
Optional
length?: number | { max: number; min: number }The expected length of the word.
Optional
strategy?: "fail" | "closest" | "shortest" | "longest" | "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.Returns a random adverb.
Optional
options: The expected length of the word or the options to use.
Optional
length?: number | { max: number; min: number }The expected length of the word.
Optional
strategy?: "fail" | "closest" | "shortest" | "longest" | "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.Returns a random conjunction.
Optional
options: The expected length of the word or the options to use.
Optional
length?: number | { max: number; min: number }The expected length of the word.
Optional
strategy?: "fail" | "closest" | "shortest" | "longest" | "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.Returns a random interjection.
Optional
options: The expected length of the word or the options to use.
Optional
length?: number | { max: number; min: number }The expected length of the word.
Optional
strategy?: "fail" | "closest" | "shortest" | "longest" | "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.Returns a random noun.
Optional
options: The expected length of the word or the options to use.
Optional
length?: number | { max: number; min: number }The expected length of the word.
Optional
strategy?: "fail" | "closest" | "shortest" | "longest" | "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.Returns a random preposition.
Optional
options: The expected length of the word or the options to use.
Optional
length?: number | { max: number; min: number }The expected length of the word.
Optional
strategy?: "fail" | "closest" | "shortest" | "longest" | "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.Returns a random word, that can be an adjective, adverb, conjunction, interjection, noun, preposition, or verb.
Optional
options: The expected length of the word or the options to use.
Optional
length?: number | { max: number; min: number }The expected length of the word.
Optional
strategy?: "fail" | "closest" | "shortest" | "longest" | "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.Returns a random verb.
Optional
options: The expected length of the word or the options to use.
Optional
length?: number | { max: number; min: number }The expected length of the word.
Optional
strategy?: "fail" | "closest" | "shortest" | "longest" | "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.Returns a random string containing some words separated by spaces.
Optional
options: number | { count?: number | { max: number; min: number } }The optional options object or the number of words to return.
Optional
count?: number | { max: number; min: number }The number of words to return.
Module to return various types of words.