# `ExUtils.Terms`
[🔗](https://github.com/sheharyarn/ex_utils/blob/main/lib/ex_utils/terms.ex#L1)

Generic utilities for all Elixir terms

# `blank?`

```elixir
@spec blank?(any()) :: boolean()
```

Evaluates if a value is blank.

Returns `true` for `nil`, `false`, `0`, empty strings, whitespace-only strings,
empty lists, and empty maps.

## Examples

```elixir
iex> blank?(0)
true
iex> blank?(nil)
true
iex> blank?(false)
true
iex> blank?("")
true
iex> blank?("  ")
true
iex> blank?([])
true
iex> blank?(%{})
true
iex> blank?([1])
false
iex> blank?("Hello")
false
```

# `is_pure_map?`

```elixir
@spec is_pure_map?(any()) :: boolean()
```

Checks if the term is a pure map (i.e. not a struct)

## Example

```elixir
iex> ExUtils.Terms.is_pure_map?(%{a: 1, b: 2})
true
iex> ExUtils.Terms.is_pure_map?(%URI{})
false
```

# `is_struct?`

```elixir
@spec is_struct?(any()) :: boolean()
```

Checks if the term is a struct as well as a map

## Example

```elixir
iex> ExUtils.Terms.is_struct?(:atom)
false
iex> ExUtils.Terms.is_struct?(%{a: 1})
false
iex> ExUtils.Terms.is_struct?(%URI{})
true
```

# `present?`

```elixir
@spec present?(any()) :: boolean()
```

Evaluates if a value is present.

This is the opposite of `blank?/1`.

## Examples

```elixir
iex> present?("Hello")
true
iex> present?(nil)
false
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
