Module: utils/get-random-name
Table of contents
Variables
Functions
Variables
adjectives
• Const adjectives: string[]
Defined in
utils/get-random-name.ts:1 (opens in a new tab)
colors
• Const colors: string[]
Defined in
utils/get-random-name.ts:227 (opens in a new tab)
nouns
• Const nouns: string[]
Defined in
utils/get-random-name.ts:152 (opens in a new tab)
Functions
generateRandomName
▸ generateRandomName(dictionaries, options?): string
Generates a random name based on the specified dictionaries.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
dictionaries | string[][] | undefined | Arrays of words to be used for generating the name. |
options? | Object | {} | Additional options to configure the generated pattern |
options.humanize? | boolean | undefined | Allow humanizing the string for titles or similar |
options.length? | number | dictionaries.length | Number of words to include in the name. |
options.separator? | string | "-" | The separator to use between words. |
Returns
string
A randomly generated name.