Getting Started
View SourceNeoFaker is an Elixir package for generating fake data for testing and development.
Installation
Add NeoFaker to your dependencies in mix.exs
:
def deps do
[
{:neo_faker, "~> 0.7.0", only: [:dev, :test]}
]
end
Then, fetch dependencies:
mix deps.get
Configuration
Set the default locale in config.exs
:
config :neo_faker, locale: "default"
If the specified locale is unavailable, it falls back to "default"
. A list of available locales
can be found on the Available Locales page.
Usage
iex> NeoFaker.App.name()
"Neo Faker"
iex> NeoFaker.App.description()
"An Elixir library for generating fake data in tests and development."
iex> NeoFaker.App.description(locale: "id_id")
"Pustaka Elixir untuk menghasilkan data palsu dalam pengujian dan pengembangan."
For full documentation, check the API Reference. For a quick guide, see the Cheat Sheet.
License
NeoFaker is licensed under the MIT License.