transmute v0.1.0 Transmute.Props

Link to this section Summary

Functions

Merges two sets of props together. First argument takes precedence over second.

Converts props to a map ast node.

Link to this section Functions

Link to this macro

merge(a, b) (macro)

Merges two sets of props together. First argument takes precedence over second.

iex> merge([a: 1], [b: 2])
[a: 1, b: 2]

iex> merge([a: 1], [a: 2])
[a: 1]

iex> merge([a: 1], [a: 2])
[a: 2]

iex> merge([a: 1], quote(do: [a: 2]))
[a: 2]
Link to this macro

to_map(props) (macro)

Converts props to a map ast node.

iex> to_map(%{foo: 1})
%{foo: 1}

iex> to_map([foo: 1])
%{foo: 1}