Skip to content

uberbrodt/blankable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blankable

Implementation of blank? in Elixir. Aims to work in a practically identical fashion to ActiveSupport's #blank? method.

Installation

Add blankable to your list of dependencies in mix.exs:

def deps do
  [{:blankable, "~> 0.0.1"}]
end

Usage

iex> Blankable.blank?(nil)
true
iex> Blankable.blank?("")
true
iex> Blankable.blank?([])
true
iex> Blankable.blank?("Hello")
false

You can also get behaviour similar to ActiveSupport's present? method like so:

def present?(term) do
  !Blankable.blank?(term)
end

About

Blank implementation for Elixir

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Elixir 100.0%