View Source Dreamy 😴

ci mit commits 0.2.3 downloads PRs Welcome Dreamy 😴

Dreamy provides useful macros, functions, types & operators to make elixir even dreamier 😴

Modules

Usage

defmodule Example.Usage do
  use Dreamy

  # read file and split into a map of software => version,
  # -> %{"elixir" => "x.x.x", "erlang" => "x.x.x"}
  @spec versions() :: map()
  def versions do
    File.read!(".tool-versions")
    |> String.split("\n", parts: 2)
    >>> (&String.trim/1)
    >>> (&String.split/1)
    >>> (&List.to_tuple/1)
    |> Enum.into(%{})
  end
end

Installation

Available in Hex, the package can be installed by adding dreamy to your list of dependencies in mix.exs:

def deps do
  [
    {:dreamy, "~> 0.2.3"}
  ]
end