Faker (Faker v0.16.0) View Source
Main module to start application with some helper functions.
Link to this section Summary
Functions
Returns application country.
Internal function to format string.
Returns application locale.
Sets application locale.
Returns application locale ready for module constract.
Returns a (pseudo) random number as an integer between the range intervals.
Returns a random bytes.
Returns a random float in the value range 0.0 =< x < 1.0.
Starts Faker with default locale.
Starts Faker with lang
locale.
Link to this section Functions
Specs
country() :: atom()
Returns application country.
Specs
Internal function to format string.
It replaces "#"
to random number and "?"
to random latin letter.
Specs
locale() :: atom()
Returns application locale.
Specs
locale(atom()) :: :ok
Sets application locale.
Specs
mlocale() :: String.t()
Returns application locale ready for module constract.
Specs
Returns a (pseudo) random number as an integer between the range intervals.
Examples
iex> random_between(3, 7) in [3, 4, 5, 6, 7]
true
Specs
random_bytes(pos_integer()) :: binary()
Returns a random bytes.
Specs
random_uniform() :: float()
Returns a random float in the value range 0.0 =< x < 1.0.
Examples
iex> is_float(random_uniform())
true
Specs
start() :: :ok
Starts Faker with default locale.
Specs
start(atom()) :: :ok
Starts Faker with lang
locale.