Skip to main content

Person

Module to generate people's personal information such as names and job titles.

Overview

To generate a full name, use {{$person.fullName}}. Note that this is not the same as simply concatenating {{$person.firstName}} and {{$person.lastName}}, as the full name may contain a prefix, suffix, or both. Additionally, different supported locales will have differing name patterns. For example, the last name may appear before the first name, or there may be a double or hyphenated first or last name.

You can also generate the parts of a name separately, using {{$person.prefix}}, {{$person.firstName}}, {{$person.middleName}}, {{$person.lastName}}, and {{$person.suffix}}. Not all locales support all of these parts.

Many of the methods in this module can optionally choose either female, male or mixed names.

Job-related data is also available. To generate a job title, use {{$person.jobTitle}}.

This module can also generate other personal information which might appear in user profiles, such as {{$person.gender}}, {{$person.zodiacSign}}, and {{$person.bio}}.

Related modules For personal contact information like phone numbers and email addresses, see the Phone and Internet modules.


bio

Returns a random short biography

Returns: string

Examples

{{$person.bio}}  // 'graffiti advocate, singer 🥱'

firstName

Returns a random first name.

Parameters

NameTypeDefaultDescription
sex'female' | 'male'The optional sex to use. Can be either 'female' or 'male'.

Returns: string

Examples

{{$person.firstName}}  // 'Pierce'

{{$person.firstName(sex='female')}} // 'Elisa'

{{$person.firstName(sex='male')}} // 'Saul'

fullName

Generates a random full name.

Parameters

NameTypeDefaultDescription
firstNamestring{{$person.firstName}}The optional first name to use. If not specified a random one will be chosen.
lastNamestring{{$person.lastName}}The optional last name to use. If not specified a random one will be chosen.
sex'female' | 'male'{{$helpers.arrayElement(['female','male'])}}The optional sex to use. Can be either 'female' or 'male'.

Returns: string

Examples

{{$person.fullName}}  // 'Jerald Hirthe'

{{$person.fullName(firstName='Joann')}} // 'Joann Buckridge'

{{$person.fullName(firstName='Marcella',sex='female')}} // 'Marcella O'Keefe-Trantow'

gender

Returns a random gender.

Returns: string

Examples

{{$person.gender}}  // 'T* man'

jobArea

Generates a random job area.

Returns: string

Examples

{{$person.jobArea}} // 'Implementation'

jobDescriptor

Generates a random job descriptor.

Returns: string

Examples

{{$person.jobDescriptor}} // 'Direct'

jobTitle

Generates a random job title.

Returns: string

Examples

{{$person.jobTitle}} // 'Legacy Accountability Manager'

lastName

Returns a random last name.

Parameters

NameTypeDefaultDescription
sex'female' | 'male'The optional sex to use. Can be either 'female' or 'male'.

Returns: string

Examples

{{$person.lastName}}  // 'Runolfsdottir'

{{$person.lastName(sex='female')}} // 'Hyatt'

middleName

Returns a random middle name.

Parameters

NameTypeDefaultDescription
sex'female' | 'male'The optional sex to use. Can be either 'female' or 'male'.

Returns: string

Examples

{{$person.middleName}}  // 'Elliott'

{{$person.middleName(sex='female')}} // 'Willow'

prefix

Returns a random person prefix.

Parameters

NameTypeDefaultDescription
sex'female' | 'male'The optional sex to use. Can be either 'female' or 'male'.

Returns: string

Examples

{{$person.prefix}}  // 'Miss'

{{$person.prefix(sex='female')}} // 'Mrs.'

sex

Returns a random sex.

Output of this method is localised, so it should not be used to fill the parameter sex available in some other modules for example {{$person.firstName}}.

Returns: string

Examples

{{$person.sex}} // 'female'

{{$person.prefix(sex='female')}} // 'Mrs.'

sexType

Returns a random sex type. The SexType is intended to be used in parameters and conditions.

Returns: 'female' | 'male'

Examples

{{$person.sexType}} // 'female'

suffix

Returns a random person suffix.

Returns: string

Examples

{{$person.suffix}} // 'Jr.'

zodiacSign

Returns a random zodiac sign.

Returns: string

Examples

{{$person.zodiacSign}} // 'Cancer'