Convenience macros to eliminate laborious typing.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
lib
test
.formatter.exs
.gitignore
.travis.yml
README.md
mix.exs
mix.lock

README.md

Shorthand

Build Status

Convenience macros to eliminate laborious typing. Provides macros for short map, string keyed map, keyword lists, and structs (ES6 like style)

Installation

Add shorthand as a dependency in your project in your mix.exs file:

def deps do
  [
    {:shorthand, "~> 0.0.3"}
  ]
end

Usage

See the docs for more examples

defmodule MyModule do
  import Shorthand

  defstruct name: nil, age: nil

  def my_func(map(name, age, _height)) do
    build_struct(MyModule, name, age)
  end
end