Pipette.Control (pipette_elixir v0.1.3)
Pipe control combinators.
Summary
Functions
Pipe-friendly dbg/1 wrapper controlled by a predicate.
Run fun.(value) without changing the value.
Pattern-match inside a pipeline while keeping it flowing.
Inverse of pipe_when.
If cond truthy, apply fun; else pass through.
Functions
Pipe-friendly dbg/1 wrapper controlled by a predicate.
value |> dbg_when(Mix.env() == :dev)
Run fun.(value) without changing the value.
Pattern-match inside a pipeline while keeping it flowing.
user
|> pipe_case do
%{email: e} -> String.downcase(e)
_ -> nil
end
Inverse of pipe_when.
If cond truthy, apply fun; else pass through.