View Source Machete.IndifferentAccessMatcher (Machete v0.2.1)
Defines a matcher that matches indifferently (that is, it considers similar atom and string keys to be equivalent)
Link to this section Summary
Functions
Defines a matcher that matches indifferently (that is, it considers similar atom and string keys to be equivalent)
Link to this section Types
@opaque t()
Describes an instance of this matcher
Link to this section Functions
Defines a matcher that matches indifferently (that is, it considers similar atom and string keys to be equivalent)
Takes a map as its sole (mandatory) argument
Examples:
iex> assert %{a: 1} ~> indifferent_access(%{a: 1})
true
iex> assert %{"a" => 1} ~> indifferent_access(%{"a" => 1})
true
iex> assert %{a: 1} ~> indifferent_access(%{"a" => 1})
true
iex> assert %{"a" => 1} ~> indifferent_access(%{a: 1})
true
iex> assert %{1 => 1} ~> indifferent_access(%{1 => 1})
true