word Domain
The word domain maps domain keywords to underlying faker implementations.
Faker Documentation
Methods
word.adjective
Returns a random adjective.
- Canonical:
awd.domain.word.adjective - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
length | number | no | Desired length of the generated value. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for target word length. Prefer the length option. |
strategy | string | no | 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. |
Examples:
word.adjective()
word.adjective(length=1, max=1, value=1, strategy="any-length")
Example return values:
"agile""oval"
word.adverb
Returns a random adverb.
- Canonical:
awd.domain.word.adverb - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
length | number | no | Desired length of the generated value. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for target word length. Prefer the length option. |
strategy | string | no | 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. |
Examples:
word.adverb()
word.adverb(length=1, max=1, value=1, strategy="any-length")
Example return values:
"triumphantly""blindly"
word.conjunction
Returns a random conjunction.
- Canonical:
awd.domain.word.conjunction - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
length | number | no | Desired length of the generated value. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for target word length. Prefer the length option. |
strategy | string | no | 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. |
Examples:
word.conjunction()
word.conjunction(length=1, max=1, value=1, strategy="any-length")
Example return values:
"consequently"
word.interjection
Returns a random interjection.
- Canonical:
awd.domain.word.interjection - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
length | number | no | Desired length of the generated value. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for target word length. Prefer the length option. |
strategy | string | no | 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. |
Examples:
word.interjection()
word.interjection(length=1, max=1, value=1, strategy="any-length")
Example return values:
"duh""yuck"
word.noun
Returns a random noun.
- Canonical:
awd.domain.word.noun - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
length | number | no | Desired length of the generated value. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for target word length. Prefer the length option. |
strategy | string | no | 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. |
Examples:
word.noun()
word.noun(length=1, max=1, value=1, strategy="any-length")
Example return values:
"freezing""stump"
word.preposition
Returns a random preposition.
- Canonical:
awd.domain.word.preposition - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
length | number | no | Desired length of the generated value. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for target word length. Prefer the length option. |
strategy | string | no | 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. |
Examples:
word.preposition()
word.preposition(length=1, max=1, value=1, strategy="any-length")
Example return values:
"over""circa"
word.sample
Returns a random word, that can be an adjective, adverb, conjunction, interjection, noun, preposition, or verb.
- Canonical:
awd.domain.word.sample - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
length | number | no | Desired length of the generated value. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for target word length. Prefer the length option. |
strategy | string | no | 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. |
Examples:
word.sample()
word.sample(length=1, max=1, value=1, strategy="any-length")
Example return values:
"smarten""tidy"
word.verb
Returns a random verb.
- Canonical:
awd.domain.word.verb - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
length | number | no | Desired length of the generated value. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for target word length. Prefer the length option. |
strategy | string | no | 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. |
Examples:
word.verb()
word.verb(length=1, max=1, value=1, strategy="any-length")
Example return values:
"graft""banish"
word.words
Returns a random string containing some words separated by spaces.
- Canonical:
awd.domain.word.words - Faker docs: https://fakerjs.dev/api/word
| Arg | Type | Required | Description |
|---|---|---|---|
count | number | no | Number of items to generate. |
max | number | no | Maximum bound used when generating a value. |
value | number | no | Legacy shorthand for number of words to generate. Prefer the count option. |
Examples:
word.words()
word.words(count=1, max=1, value=1)
Example return values:
"sternly which""while approach though"