WuunderUtils.Presence (Wuunder Utils v0.2.6)

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

Summary

Functions

The inverse of present?

Checks if value is present

Types

Functions

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

The inverse of present?

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
Link to this function

present?(value)

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

Checks if value is present

Examples

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

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

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

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

iex> WuunderUtils.Presence.present?("test")
true