View Source HypeLib.Prelude (HypeLib v2.0.0)
The Prelude
module contains utility functions for working with
external dependencies like TypeCheck, the Elixir Logger
moudle etc.
Link to this section Summary
Link to this section Functions
Imports TypeCheck and requires the Erlang logger
Imports the Ecto schema functions and all changeset functions
Imports the Absinthe notation module
Imports the HypeLib.Utils.String
module as StringUtils
into the current context.
examples
Examples
iex> defmodule TokenGenerator do
...> use HypeLib.Prelude, :string
...>
...> @spec! generate_token() :: String.t()
...> def generate_token() do
...> StringUtils.Generator.generate_string!(1, ~w(a))
...> end
...> end
...>
...> TokenGenerator.generate_token()
"a"