MapSorter.Container (Map Sorter v0.2.45) View Source
Generates index brackets as a string from a sort spec key
.
Link to this section Summary
Functions
Generates index brackets as a string from a sort spec key
.
Link to this section Functions
Specs
brackets(MapSorter.SortSpec.key()) :: String.t()
Generates index brackets as a string from a sort spec key
.
Examples
iex> import MapSorter.Container, only: [brackets: 1]
iex> brackets([:birth, :date])
"[:birth][:date]"
iex> import MapSorter.Container, only: [brackets: 1]
iex> brackets([:address, 'city', :state])
"[:address]['city'][:state]"
iex> import MapSorter.Container, only: [brackets: 1]
iex> brackets([:dob])
"[:dob]"
iex> import MapSorter.Container, only: [brackets: 1]
iex> brackets(:dob)
"[:dob]"
iex> import MapSorter.Container, only: [brackets: 1]
iex> brackets('dob')
"['dob']"