lib/pages/cheat.cheatmd

# Cheat Sheet

A quick reference for the most commonly used random data generator functions.

## [App](`NeoFaker.App`)

{: .col-2}

### [`author(opts \\ [])`](`NeoFaker.App.author/1`)

```elixir
iex> NeoFaker.App.author()
"José Valim"
```

### [`description(opts \\ [])`](`NeoFaker.App.description/1`)

```elixir
iex> NeoFaker.App.description()
"Elixir library for generating fake data in tests and development."
```

### [`license()`](`NeoFaker.App.license/0`)

```elixir
iex> NeoFaker.App.license()
"MIT License"
```

### [`name(opts \\ [])`](`NeoFaker.App.name/1`)

```elixir
iex> NeoFaker.App.name()
"Neo Faker"

iex> NeoFaker.App.name(style: :camel_case)
"neoFaker"
```

### [`semver(opts \\ [])`](`NeoFaker.App.semver/1`)

```elixir
iex> NeoFaker.App.semver()
"1.2.3"

iex> NeoFaker.App.semver(type: :pre_release)
"1.2.3-beta.1"
```

### [`version()`](`NeoFaker.App.version/0`)

```elixir
iex> NeoFaker.App.version()
"1.2"
```

## [Blood](`NeoFaker.Blood`)

{: .col-2}

### [`group()`](`NeoFaker.Blood.group/0`)

```elixir
iex> NeoFaker.Blood.group()
"B+"
```

### [`type()`](`NeoFaker.Blood.type/0`)

```elixir
iex> NeoFaker.Blood.type()
"B"
```

## [Boolean](`NeoFaker.Boolean`)

{: .col-1}

### [`boolean(true_ratio \\ 50, opts \\ [])`](`NeoFaker.Boolean.boolean/2`)

```elixir
iex> NeoFaker.Boolean.boolean()
false

iex> NeoFaker.Boolean.boolean(75)
true

iex> NeoFaker.Boolean.boolean(75, integer: true)
1
```

## [Crypto](`NeoFaker.Crypto`)

{: .col-1}

### [`md5(opts \\ [])`](`NeoFaker.Crypto.md5/1`)

```elixir
iex> NeoFaker.Crypto.md5()
"e35cb102765cfc56df21ba4c16e6a636"

iex> NeoFaker.Crypto.md5(case: :upper)
"E35CB102765CFC56DF21BA4C16E6A636"
```

`NeoFaker.Crypto.sha1/1` and `NeoFaker.Crypto.sha256/1` behave similarly.

## [Gravatar](`NeoFaker.Gravatar`)

{: .col-1}

### [`display(email \\ nil, opts \\ [])`](`NeoFaker.Gravatar.display/2`)

```elixir
iex> NeoFaker.Gravatar.display()
"https://gravatar.com/avatar/<hashed_email>?d=identicon&s=80"

iex> NeoFaker.Gravatar.display("john.doe@example.com", fallback: :monsterid)
"https://gravatar.com/avatar/<hashed_email>?d=monsterid&s=80"
```

## [Person](`NeoFaker.Person`)

{: .col-2}

### [`age(min \\ 0, max \\ 120)`](`NeoFaker.Person.age/2`)

```elixir
iex> NeoFaker.Person.age()
44

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

### [`binary_gender()`](`NeoFaker.Person.binary_gender/0`)

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

### [`first_name(opts \\ [])`](`NeoFaker.Person.first_name/1`)

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

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

`NeoFaker.Person.middle_name/1` and `NeoFaker.Person.last_name/1` behave similarly.

### [`full_name(opts \\ [])`](`NeoFaker.Person.full_name/1`)

```elixir
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"
```

### [`non_binary_gender(opts \\ [])`](`NeoFaker.Person.non_binary_gender/1`)

```elixir
iex> NeoFaker.Person.non_binary_gender()
"Agender"
```

### [`prefix(opts \\ [])`](`NeoFaker.Person.prefix/1`)

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

### [`short_binary_gender(opts \\ [])`](`NeoFaker.Person.short_binary_gender/1`)

```elixir
iex> NeoFaker.Person.short_binary_gender()
"F"
```

### [`suffix(opts \\ [])`](`NeoFaker.Person.suffix/1`)

```elixir
iex> NeoFaker.Person.suffix()
"IV"
```