Captain is currently in ALPHA. We are happy to get your feedback
Core API
Utils Get Random Name

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

NameTypeDefault valueDescription
dictionariesstring[][]undefinedArrays of words to be used for generating the name.
options?Object{}Additional options to configure the generated pattern
options.humanize?booleanundefinedAllow humanizing the string for titles or similar
options.length?numberdictionaries.lengthNumber of words to include in the name.
options.separator?string"-"The separator to use between words.

Returns

string

A randomly generated name.

Defined in

utils/get-random-name.ts:336 (opens in a new tab)