Exop v1.4.0 Exop.Utils View Source

A bunch of common functions.

Link to this section Summary

Link to this section Functions

Link to this function

defined_params(contract, received_params) View Source
defined_params(list(), map()) :: map()

Link to this function

fetch_inner_checks(contract_item_opts) View Source
fetch_inner_checks(list()) :: map() | nil

Link to this function

put_param_value(value, collection, item_name) View Source
put_param_value(any(), Keyword.t() | map(), atom() | String.t()) ::
  Keyword.t() | map()

Link to this function

resolve_coercions(received_params, list, coerced_params) View Source
resolve_coercions(
  map(),
  [%{name: atom() | String.t(), opts: Keyword.t()}],
  map()
) :: any()

Link to this function

resolve_defaults(received_params, list, resolved_params) View Source
resolve_defaults(
  map(),
  [%{name: atom() | String.t(), opts: Keyword.t()}],
  map()
) :: map()

Link to this function

resolve_from(received_params, list, resolved_params) View Source
resolve_from(map(), [%{name: atom() | String.t(), opts: Keyword.t()}], map()) ::
  map()

Link to this function

try_map(struct) View Source
try_map(any()) :: map() | nil

Tries to make a map from a struct and keyword list