Page MenuHomePhorge

guards.ex
No OneTemporary

Size
472 B
Referenced Files
None
Subscribers
None

guards.ex

# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Utils.Guards do
@moduledoc """
Project-wide custom guards.
See: https://hexdocs.pm/elixir/master/patterns-and-guards.html#custom-patterns-and-guards-expressions
"""
@doc "Checks for non-empty string"
defguard not_empty_string(string) when is_binary(string) and string != ""
end

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 20, 1:06 PM (47 m, 28 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
973646
Default Alt Text
guards.ex (472 B)

Event Timeline