PassiveSupport.Map.plain

You're seeing just the function plain, go back to PassiveSupport.Map module for more information.

Specs

plain(struct() | map()) :: map()

Deletes the struct metadata from structs, but leaves ordinary maps unchanged

Examples

PassiveSupport.Map.plain(%{foo: :bar})
# => %{foo: :bar}

defmodule Plane do
  defstruct plains: :great     # ... little plain punning for ya.
end

PassiveSupport.Map.plain(%Plane{})
# => %{plains: :great}