Packages

Elixir client for Apache RocketMQ

Current section

Files

Jump to
ex_rocketmq lib ex_rocketmq util bool.ex
Raw

lib/ex_rocketmq/util/bool.ex

defmodule ExRocketmq.Util.Bool do
@moduledoc """
bool util
"""
@spec boolean?(String.t()) :: boolean()
def boolean?(value) do
case value do
"1" -> true
"t" -> true
"T" -> true
"TRUE" -> true
"True" -> true
"true" -> true
_ -> false
end
end
end