Represents an Iconify icon set (collection of icons with a common prefix).
Summary
Functions
Returns the number of icons in the set (excluding aliases).
Gets an icon from the set by name, resolving aliases and alias transformations.
Gets an icon from the set by name, raising if not found.
Checks if an icon exists in the set.
Lists all icon names in the set (excluding aliases).
Lists all icon names including aliases.
Loads an icon set from a JSON file.
Loads an icon set from a JSON file, raising on error.
Parses an icon set from a JSON string (IconifyJSON format).
Parses an icon set from decoded IconifyJSON data.
Types
@type t() :: %Iconify.Set{ aliases: %{required(String.t()) => map()}, height: pos_integer(), icons: %{required(String.t()) => Iconify.Icon.t()}, left: integer(), prefix: String.t(), top: integer(), width: pos_integer() }
Functions
@spec count(t()) :: non_neg_integer()
Returns the number of icons in the set (excluding aliases).
@spec get(t(), String.t()) :: {:ok, Iconify.Icon.t()} | :error
Gets an icon from the set by name, resolving aliases and alias transformations.
@spec get!(t(), String.t()) :: Iconify.Icon.t()
Gets an icon from the set by name, raising if not found.
Checks if an icon exists in the set.
Lists all icon names in the set (excluding aliases).
Lists all icon names including aliases.
Loads an icon set from a JSON file.
Loads an icon set from a JSON file, raising on error.
Parses an icon set from a JSON string (IconifyJSON format).
Parses an icon set from decoded IconifyJSON data.