# `NeoFaker.Person`
[🔗](https://github.com/muzhawir/neo_faker/blob/main/lib/neo_faker/person.ex#L1)

Functions for generating person-related information.

Provides utilities to generate random personal details including first, middle,
and last names, full names, prefixes, suffixes, ages, and genders with support
for multiple locales and sex options.

# `age`
*since 0.6.0* 

```elixir
@spec age(non_neg_integer(), non_neg_integer()) :: non_neg_integer()
```

Generates a random age as a non-negative integer.

## Parameters

- `min` - Minimum age, inclusive. Defaults to `0`.
- `max` - Maximum age, inclusive. Defaults to `120`.

## Examples

    iex> NeoFaker.Person.age()
    44

    iex> NeoFaker.Person.age(7, 44)
    27

    iex> NeoFaker.Person.age(18, 65)
    35

# `binary_gender`
*since 0.6.0* 

```elixir
@spec binary_gender(Keyword.t()) :: String.t()
```

Generates a random binary gender.

Returns either `"Male"` or `"Female"` in the configured locale.

## Options

- `:locale` - Locale to use. Defaults to the application's configured locale.

## Examples

    iex> NeoFaker.Person.binary_gender()
    "Male"

    iex> NeoFaker.Person.binary_gender(locale: :id_id)
    "Perempuan"

# `first_name`
*since 0.7.0* 

```elixir
@spec first_name(Keyword.t()) :: String.t()
```

Generates a random first name.

## Options

- `:sex` - Sex of the name. One of `:unisex` (default), `:female`, or `:male`.
- `:locale` - Locale to use. Defaults to the application's configured locale.

## Examples

    iex> NeoFaker.Person.first_name()
    "Julia"

    iex> NeoFaker.Person.first_name(sex: :male)
    "José"

    iex> NeoFaker.Person.first_name(locale: :id_id)
    "Jaka"

# `full_name`
*since 0.7.0* 

```elixir
@spec full_name(Keyword.t()) :: String.t()
```

Generates a random full name.

Combines a first name, an optional middle name, and a last name.

## Options

- `:sex` - Sex of the name. One of `:unisex` (default), `:female`, or `:male`.
- `:locale` - Locale to use. Defaults to the application's configured locale.
- `:middle_name` - Whether to include a middle name. Defaults to `true`.

## Examples

    iex> NeoFaker.Person.full_name()
    "Abigail Bethany Crawford"

    iex> NeoFaker.Person.full_name(sex: :male)
    "Daniel Edward Fisher"

    iex> NeoFaker.Person.full_name(middle_name: false)
    "Gabriella Harrison"

    iex> NeoFaker.Person.full_name(sex: :female, locale: :id_id, middle_name: false)
    "Siti Nurhaliza"

# `full_name_with_title`
*since 0.6.0* 

```elixir
@spec full_name_with_title(Keyword.t()) :: String.t()
```

Generates a random full name with optional prefix and/or suffix.

Delegates to `full_name/1` and wraps the result with the requested title parts.

## Options

- `:sex` - Sex of the name. One of `:unisex` (default), `:female`, or `:male`.
- `:locale` - Locale to use. Defaults to the application's configured locale.
- `:middle_name` - Whether to include a middle name. Defaults to `true`.
- `:prefix` - When `true`, prepends a name prefix such as `"Mr."` or `"Dr."`. Defaults to `false`.
- `:suffix` - When `true`, appends a name suffix such as `"Jr."` or `"III"`. Defaults to `false`.

## Examples

    iex> NeoFaker.Person.full_name_with_title(prefix: true)
    "Dr. Abigail Bethany Crawford"

    iex> NeoFaker.Person.full_name_with_title(suffix: true)
    "Daniel Edward Fisher Jr."

    iex> NeoFaker.Person.full_name_with_title(prefix: true, suffix: true, middle_name: false)
    "Mr. John Smith III"

# `last_name`
*since 0.7.0* 

```elixir
@spec last_name(Keyword.t()) :: String.t()
```

Generates a random last name.

## Options

- `:sex` - Sex of the name. One of `:unisex` (default), `:female`, or `:male`.
- `:locale` - Locale to use. Defaults to the application's configured locale.

## Examples

    iex> NeoFaker.Person.last_name()
    "Smith"

    iex> NeoFaker.Person.last_name(sex: :male)
    "Johnson"

    iex> NeoFaker.Person.last_name(locale: :id_id)
    "Wijaya"

# `middle_name`
*since 0.7.0* 

```elixir
@spec middle_name(Keyword.t()) :: String.t()
```

Generates a random middle name.

## Options

- `:sex` - Sex of the name. One of `:unisex` (default), `:female`, or `:male`.
- `:locale` - Locale to use. Defaults to the application's configured locale.

## Examples

    iex> NeoFaker.Person.middle_name()
    "Anne"

    iex> NeoFaker.Person.middle_name(sex: :male)
    "James"

    iex> NeoFaker.Person.middle_name(locale: :id_id)
    "Budi"

# `non_binary_gender`
*since 0.6.0* 

```elixir
@spec non_binary_gender(Keyword.t()) :: String.t()
```

Generates a random non-binary gender identity string.

## Options

- `:locale` - Locale to use. Defaults to the application's configured locale.

## Examples

    iex> NeoFaker.Person.non_binary_gender()
    "Non-binary"

    iex> NeoFaker.Person.non_binary_gender(locale: :id_id)
    "Non-biner"

# `prefix`
*since 0.7.0* 

```elixir
@spec prefix(Keyword.t()) :: String.t()
```

Generates a random name prefix such as `"Mr."`, `"Ms."`, or `"Dr."`.

## Options

- `:locale` - Locale to use. Defaults to the application's configured locale.

## Examples

    iex> NeoFaker.Person.prefix()
    "Mr."

    iex> NeoFaker.Person.prefix(locale: :id_id)
    "Tn."

# `short_binary_gender`
*since 0.6.0* 

```elixir
@spec short_binary_gender(Keyword.t()) :: String.t()
```

Generates a random short binary gender such as `"M"` or `"F"`.

## Options

- `:locale` - Locale to use. Defaults to the application's configured locale.

## Examples

    iex> NeoFaker.Person.short_binary_gender()
    "M"

    iex> NeoFaker.Person.short_binary_gender(locale: :id_id)
    "P"

# `suffix`
*since 0.7.0* 

```elixir
@spec suffix(Keyword.t()) :: String.t()
```

Generates a random name suffix such as `"Jr."`, `"Sr."`, or `"III"`.

## Options

- `:locale` - Locale to use. Defaults to the application's configured locale.

## Examples

    iex> NeoFaker.Person.suffix()
    "Jr."

    iex> NeoFaker.Person.suffix(locale: :id_id)
    "S.Kom"

    iex> NeoFaker.Person.suffix(locale: :en_us)
    "III"

---

*Consult [api-reference.md](api-reference.md) for complete listing*
