# Person

# aadhar

Aadhar (English: Foundation) is a 12-digit unique identity number that can be obtained by residents of India, based on their biometric and demographic data.

// usage
{{aadhar()}}
{{aadhar({ onlyLastFour: true })}} // false by default
{{aadhar({ separatedByWhiteSpace: false })}} // true by default

Generate a random aadhar.

{{aadhar()}};
=> '8506 7820 9696'

Optionally provide option of getting only the last four

{{aadhar({ onlyLastFour: true })}};
=> '1851'

Optionally specify dashes be removed

{{aadhar({ separatedByWhiteSpace: false })}};
'873300307032'

# age

// usage
{{age()}}
{{age({ type: 'child' })}}

Generate a random age

{{age()}};
=> 45

Default range is between 1 and 120

Optionally specify one of a handful of enumerated age types:

{{age({type: 'child'})}};
=> 9

Allowed types are: child, teen, adult, senior


# birthday

// usage
{{birthday()}}
{{birthday({ string: true })}}
{{birthday({ type: 'child' })}}

Generate a random birthday

{{birthday()}};
=> Fri Aug 16 1985 00:00:00 GMT-0400 (EDT)

By default, returns an actual JavaScript Date object.

Optionally specify it be returned as a string.

{{birthday({string: true})}};
=> '4/1/1968'

By default returns in MM/DD/YYYY format. Can specify DD/MM/YYYY as follows:

{{birthday({string: true, american: false})}};
=> '28/6/1993'

For more complex date formats, use the Moment library.

Can specify the type, same types as with age.

{{birthday({type: 'child'})}};
=> Sat Sep 08 2001 00:00:00 GMT-0400 (EDT)

You can compose with {{year for interesting combinations. For example, let's say we want to get the birthdays of some renaissance artists (born between 1450 and 1500). We can generate a year and then get a birthday from that year:

var year = {{year({ min: 1450, max: 1500 })}};
{{birthday({ year: year })}};
=> Wed Aug 27 1484 11:24:14 GMT-0400 (EDT)

// Could be simplified down to one line
{{birthday({ year: {{year({ min: 1450, max: 1500 })}} })}};
=> Fri Nov 26 1469 09:17:13 GMT-0500 (EST)

Can specify maxAge and/or minAge. This will return a date which yields to an age between the given range. Attention on limits: the full day of birthdays are considered to be part of the allowed range (from the first millisecond of the minimum date to the last second of the maximum date).

{{birthday({minAge: 18, maxAge: 21})}};
=> Thu Apr 18 2002 13:48:34 GMT-0400 (EDT)

# cf

// usage
{{cf()}}

Generate a random Italian social security number (Codice Fiscale).

{{cf()}};
=> 'BRSMRT87S49A988X'

Optionally specify any or all components: first name, last name, gender, birth date, place of birth (using ISTAT geocodes for Italian cities).

{{cf({first: 'Sergio', last: 'Leone'})}};
=> 'LNESRG93P28F067V'

{{cf({first: 'Sophia', last: 'Loren', gender: 'Female', birthday: new Date(1934,8,20), city: 'h501'})}};

=> 'LRNSPH34P60H501G'

# cpf

// usage
{{cpf()}}

Generate a random Brazilian tax id.

{{cpf()}};
=> '607.116.899-62'

Optionally omit punctuation:

{{cpf({ formatted: false })}};
=> '18641718397'

# first

// usage
{{first()}}
{{first({ nationality: 'en' })}}

Generate a random first name

{{first()}};
=> 'Leila'

Optionally specify a gender to limit first names to that gender

{{first({ gender: "female" })}};
=> 'Emma'

Optionally specify a nationality to limit first names to those most common of that nationality

{{first({ nationality: "it" })}};
=> 'Alberto'

Note, currently support for nationality is limited to: 'en', 'it', 'nl', 'fr'.


# gender

// usage
{{gender()}}

Generate a random gender

  {{gender()}};
  => 'Female'

Extra genders can be provided using the extraGenders key in the optional options argument:

  Chance.gender({
    extraGenders: ['Agender', 'Genderqueer', 'Trans', 'Pangender']
  });

# last

// usage
{{last()}}
{{last({ nationality: 'en' })}}

Generate a random last name

{{last()}};
=> 'Mago'

Optionally specify a nationality to limit first names to those most common of that nationality

{{last({ nationality: 'it' })}};
=> 'Giovannini'

Note, currently support for nationality is limited to: 'en', 'it', 'nl', 'uk', 'de', 'jp', 'es', 'fr'.


# name

// usage
{{name()}}
{{name({ middle: true })}}
{{name({ middle_initial: true })}}
{{name({ prefix: true })}}
{{name({ nationality: 'en' })}}

Generate a random name

  {{name()}};
  => 'Dafi Vatemi'

Optionally include the middle name

  {{name({ middle: true })}};
  => 'Nelgatwu Powuku Heup'

Optionally include the middle initial

  {{name({ middle_initial: true })}};
  => 'Ezme I Iza'

Optionally include the prefix

  {{name({ prefix: true })}};
  => 'Doctor Suosat Am'

Optionally include the suffix

  {{name({ suffix: true })}};
  => 'Fanny Baker Esq.'

Optionally specify a gender

  {{name({ gender: 'male' })}};
  => "Patrick Copeland"

Optionally specify a nationality

  {{name({ nationality: 'it' })}};
  => "Roberta Mazzetti"

Note, currently support for nationality is limited to: 'en', 'it'.


# prefix

// usage
{{prefix()}}
{{prefix({ full: true })}}

Generate a random name prefix

{{prefix()}};
=> 'Mrs.'

By default, returns the shorter version.

Optionally get back the full version.

{{prefix({ full: true })}};
=> 'Mister'

Optionally specify a gender. Valid options are male, female, or all (the default).

{{prefix({ gender: "male" })}};
=> 'Mr.'

{{prefix({ gender: "female" })}};
=> 'Miss'

To maintain legacy support, this also responds to {{name_prefix()}}.


# ssn

// usage
{{ssn()}}
{{ssn({ ssnFour: true })}}
{{ssn({ dashes: false })}}

Generate a random social security number.

{{ssn()}};
=> '411-90-0070'

Optionally provide option of getting only the last four

{{ssn({ ssnFour: true })}};
=> '2938'

Optionally specify dashes be removed

{{ssn({ dashes: false })}};
=> '293839295'

# suffix

// usage
{{suffix()}}
{{suffix({ full: true })}}

Generate a random name suffix

{{suffix()}};
=> 'Sr.'

By default, returns the shorter version.

Optionally get back the full version.

{{suffix({ full: true })}};
=> 'Juris Doctor'

To maintain legacy support, this also responds to {{name_suffix()}}.


# zodiac

// usage
{{zodiac()}}

Generate a random zodiac signs.

{{zodiac()}};
=> 'Aries'