ash_hq/lib/ash_hq_web/helpers.ex

8 lines
206 B
Elixir
Raw Normal View History

defmodule AshHqWeb.Helpers do
def latest_version(library) do
Enum.find(library.versions, fn version ->
!String.contains?(version.version, ".")
end) || Enum.at(library.versions, 0)
end
end