View Source WuunderUtils.Presence (Wuunder Utils v0.7.0)

Acts as proxy module towards any? functions of String and Map

Summary

Functions

Checks if value is present

The inverse of any?

Types

Functions

@spec any?(t()) :: boolean()

Checks if value is present

Examples

iex> WuunderUtils.Presence.any?(nil)
false

iex> WuunderUtils.Presence.any?(%{})
false

iex> WuunderUtils.Presence.any?(%{value: 1200})
true

iex> WuunderUtils.Presence.any?("")
false

iex> WuunderUtils.Presence.any?("test")
true
@spec empty?(t()) :: boolean()

The inverse of any?

Examples

iex> WuunderUtils.Presence.empty?(nil)
true

iex> WuunderUtils.Presence.empty?(%{})
true

iex> WuunderUtils.Presence.empty?(%{value: 1200})
false

iex> WuunderUtils.Presence.empty?("")
true

iex> WuunderUtils.Presence.empty?("test")
false