# `PgRest.Utils`
[🔗](https://github.com/agoodway/pgrest/blob/v0.1.0/lib/pg_rest/utils.ex#L1)

Shared utility functions for PgRest modules.

# `safe_to_atom`

```elixir
@spec safe_to_atom(atom()) :: atom()
@spec safe_to_atom(String.t()) :: atom()
```

Converts a string to an existing atom, passing atoms through unchanged.

Raises `ArgumentError` if the atom does not already exist.

# `safe_to_existing_atom`

```elixir
@spec safe_to_existing_atom(atom()) :: atom()
@spec safe_to_existing_atom(String.t()) :: atom() | nil
```

Converts a string to an existing atom, returning `nil` if the atom does not exist.

Passes atoms through unchanged.

---

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