Name

Module to generate people's names and titles.

Find Name

Generates a random full name.

Parameters

NameTypeDefaultDescription
firstName?string

The optional first name to use. If not specified a random one will be chosen.

lastName?string

The optional last name to use. If not specified a random one will be chosen.

gender?GenderType

The optional gender to use. Can be either 'female' or 'male'.

Returns: string

faker.name.findName(firstName?: string, lastName?: string, gender?: GenderType): string
faker.name.findName() // => "Kelvin Sporer"
faker.name.findName() // 'Allen Brown'
faker.name.findName('Joann') // 'Joann Osinski'
faker.name.findName('Marcella', '', 'female') // 'Mrs. Marcella Huels'
faker.name.findName(undefined, 'Beer') // 'Mr. Alfonso Beer'
faker.name.findName(undefined, undefined, 'male') // 'Fernando Schaefer'

First Name

Returns a random first name.

Parameters

NameTypeDefaultDescription
gender?GenderType

The optional gender to use. Can be either 'female' or 'male'.

Returns: string

faker.name.firstName(gender?: GenderType): string
faker.name.firstName() // => "Katelynn"
faker.name.firstName() // 'Antwan'
faker.name.firstName("female") // 'Victoria'
faker.name.firstName("male") // 'Tom'

Gender

Return a random gender.

Parameters

NameTypeDefaultDescription
binary?booleanfalse

Whether to return only binary gender names.

Returns: string

faker.name.gender(binary?: boolean = false): string
faker.name.gender() // => "Gender Fluid"
faker.name.gender() // 'Trans*Man'
faker.name.gender(true) // 'Female'

Job Area

Generates a random job area.

Returns: string

faker.name.jobArea(): string
faker.name.jobArea() // => "Infrastructure"
faker.name.jobArea() // 'Brand'

Job Descriptor

Generates a random job descriptor.

Returns: string

faker.name.jobDescriptor(): string
faker.name.jobDescriptor() // => "Customer"
faker.name.jobDescriptor() // 'Customer'

Job Title

Generates a random job title.

Returns: string

faker.name.jobTitle(): string
faker.name.jobTitle() // => "Customer Intranet Developer"
faker.name.jobTitle() // 'Global Accounts Engineer'

Job Type

Generates a random job type.

Returns: string

faker.name.jobType(): string
faker.name.jobType() // => "Designer"
faker.name.jobType() // 'Assistant'

Last Name

Returns a random last name.

Parameters

NameTypeDefaultDescription
gender?GenderType

The optional gender to use. Can be either 'female' or 'male'.

Returns: string

faker.name.lastName(gender?: GenderType): string
faker.name.lastName() // => "Lowe"
faker.name.lastName() // 'Hauck'
faker.name.lastName("female") // 'Grady'
faker.name.lastName("male") // 'Barton'

Middle Name

Returns a random middle name.

Parameters

NameTypeDefaultDescription
gender?GenderType

The optional gender to use. Can be either 'female' or 'male'.

Returns: string

faker.name.middleName(gender?: GenderType): string
faker.name.middleName() // => "Kyle"
faker.name.middleName() // 'Доброславівна'
faker.name.middleName("female") // 'Анастасівна'
faker.name.middleName("male") // 'Вікторович'

Prefix

Returns a random name prefix.

Parameters

NameTypeDefaultDescription
gender?GenderType

The optional gender to use. Can be either 'female' or 'male'.

Returns: string

faker.name.prefix(gender?: GenderType): string
faker.name.prefix() // => "Ms."
faker.name.prefix() // 'Miss'
faker.name.prefix('female') // 'Ms.'
faker.name.prefix('male') // 'Mr.'

Suffix

Returns a random name suffix.

Returns: string

faker.name.suffix(): string
faker.name.suffix() // => "V"
faker.name.suffix() // 'DDS'

Title

Deprecated

This method is deprecated and will be removed in a future version.

Generates a random job title.

Returns: string

faker.name.title(): string
faker.name.title() // => "Customer Intranet Developer"
faker.name.title() // 'International Integration Manager'