Shared formatting helpers for display in the TUI.
Summary
Functions
Formats an Ash type for display, stripping common prefixes.
Returns the last segment of a module name.
Functions
Formats an Ash type for display, stripping common prefixes.
Examples
iex> AshTui.Format.format_type(:string)
"string"
iex> AshTui.Format.format_type({:array, :string})
"[string]"
Returns the last segment of a module name.
Examples
iex> AshTui.Format.short_name(MyApp.Accounts.User)
"User"
iex> AshTui.Format.short_name(MyApp.Blog)
"Blog"