elmxir v0.0.1 Elmxir

Helper methods for a better life with Elm + Elixir

Summary

Functions

Get the arguments from an Elm object

Get the action name of an Elm object

Functions

gather_args(action)

Specs

gather_args(map) :: list
gather_args(nil) :: list

Get the arguments from an Elm object

Returned in a mixed-type list

Examples

iex> Elmxir.gather_args(nil) []

iex> Elmxir.gather_args(%{“_0” => 1}) [1]

gather_args(action, index)

Specs

gather_args(map, integer) :: list
get_action_name(action)

Specs

get_action_name(map) :: string

Get the action name of an Elm object

Defaults to nil

Examples

iex> Elmxir.get_action_name(%{}) nil

iex> Elmxir.get_action_name(%{ “ctor” => “Name” }) “Name”