Packages

A collection of Phoenix LiveView lifecycle hooks and utility functions for working with URL state.

Current section

Files

Jump to
ex_live_url lib ex_live_url operation.ex
Raw

lib/ex_live_url/operation.ex

defmodule ExLiveUrl.Operation do
@moduledoc false
@type t :: ExLiveUrl.Operable.t()
def is_operation?(maybe_operation) do
case ExLiveUrl.Operable.impl_for(maybe_operation) do
nil -> false
_impl -> true
end
end
def send(operation, pid \\ self()), do: Kernel.send(pid, operation)
def apply(operation, url_state, socket) do
ExLiveUrl.Operable.apply(operation, url_state, socket)
end
end