View Source Backpex.HTML (Backpex v0.8.2)
Contains common HTML functions.
Summary
Functions
Prettifies any input and show a placeholder in case the value is nil
.
Functions
Prettifies any input and show a placeholder in case the value is nil
.
Examples
iex> Backpex.HTML.pretty_value(nil)
"—"
iex> Backpex.HTML.pretty_value("")
"—"
iex> Backpex.HTML.pretty_value(1_000_000)
1000000
iex> Backpex.HTML.pretty_value(1.11)
1.11
iex> Backpex.HTML.pretty_value("Hello, universe")
"Hello, universe"