Packages

A collection of helpers to operate on nested maps. See README for the complete list of helpers. The test suite is also helpful.

Current section

Files

Jump to
digger lib protocols snake_caser_protocol.ex
Raw

lib/protocols/snake_caser_protocol.ex

defprotocol Digger.SnakeCaser do
@moduledoc """
Documentation for Digger.SnakeCaser Protocol
"""
@fallback_to_any true
@doc """
snake_case a valid Types.data_type according to the protocol implementation
"""
@spec snake_case(Types.data_type(), keyword()) :: Types.valid_return_type()
def snake_case(data_type, opts \\ [type: :key, key_transform: :snake, value_transform: :none])
end