PassiveSupport.Item.blank-question-mark

You're seeing just the function blank-question-mark, go back to PassiveSupport.Item module for more information.

Specs

blank?(t()) :: boolean()

Returns true of any value that would return true with Enum.empty?/1, as well as to bare tuples, binaries with no data, and strings containing only whitespace, nil, and false. Returns false for any other value.

Note that while a string containing only whitespace can be considered blank, a charlist of the same nature will return false. Because charlists are represented internally as lists of integers, a charlist of whitespace would be indescernible from a list of numeric integers, neither of which would be individually considered blank, and therefore should not be regarded as blank in tandem.

Examples

iex> blank?({})
true
iex> blank?(%{})
true
iex> blank?(MapSet.new())
true
iex> blank?(0)
false
iex> blank?(nil)
true
iex> blank?(false)
true
iex> blank?("  ")
true
iex> blank?('  ') # [32, 32]
false
iex> blank?(" hi ")
false