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

NeoFaker is a package for generating fake data in Elixir.

This module provides the main interface for starting the application and seeding the random
number generator. See `NeoFaker.Locale` for managing locale configuration.

## Locale support

Many modules accept a `:locale` option. Use `NeoFaker.Locale.set/1` to override the locale for
the calling process, or pass `locale:` per call. To set a locale for the whole application
instead (e.g. for a Phoenix app), configure `config :neo_faker, locale: ...`, then see
[Getting Started](https://hexdocs.pm/neo_faker/getting-started.html).

    iex> NeoFaker.Locale.set(:id_id)
    :ok

    iex> NeoFaker.Person.first_name()  # uses :id_id for this process
    "Jaka"

    iex> NeoFaker.Person.first_name(locale: :en_us)  # overrides per call
    "José"

See the [available locales](https://hexdocs.pm/neo_faker/locales.html) for the full list of
supported locale codes.

# `seed`
*since 0.15.0* 

```elixir
@spec seed(integer() | {integer(), integer(), integer()}) :: :ok
```

Seeds the random number generator for the calling process, for reproducible output.

NeoFaker draws values via `Enum.random/1` and `:rand.uniform/1`, both backed by `:rand`, which
OTP already seeds automatically and unpredictably per process. Call this at the start of a
test (or anywhere else you need deterministic fake data) to pin that seed instead.

## Examples

    iex> NeoFaker.seed(12_345)
    :ok

    iex> NeoFaker.seed({1, 2, 3})
    :ok

# `start`
*since 0.1.0* 

```elixir
@spec start() :: :ok
```

Starts the NeoFaker application and ensures a locale is configured.

If no locale is set in the application environment, it defaults to `:default`.
Prints the active locale to stdout and returns `:ok`.

## Examples

    iex> NeoFaker.start()
    :ok

---

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