ExUtils v0.1.6 ExUtils
Collection of core Elixir utility methods that don’t fit in any specific Module
Summary
Functions
Checks if the term is a pure map (i.e. not a struct)
Checks if the term is a struct as well as a map
Functions
Checks if the term is a pure map (i.e. not a struct)
Example
ExUtils.is_pure_map?(%{a: 1, b: 2}) # => true
ExUtils.is_pure_map?(%Person{name: "Ali"}) # => false
Checks if the term is a struct as well as a map
Example
ExUnit.is_struct?(:atom) # => false
ExUnit.is_struct?(%{a: 1}) # => false
ExUnit.is_struct?(%Person{name: "Ali"}) # => true