8000 GitHub - samsondav/blankable: Blank implementation for Elixir
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

samsondav/blankable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 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, "~> 1.0.0"}]
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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0