Bottle

Build Status Coverage Status

Installation

The the package can be installed from Hex, by adding bottle to your list of dependencies in mix.exs:

def deps do
  [
    {:bottle, "~> 0.1.2"}
  ]
end

Usage

Just put this on top of your module and get all the guards available in your scope

defmodule MyModule do
  use Bottle

  def foo(bar) when is_empty_binary(bar) do
    :empty
  end
end

You can also import the guards selectively, ie:

import Bottle.Binary, only: [is_empty_binary: 1]

Documentation

The documentation can be found at https://hexdocs.pm/bottle.