An open API service indexing awesome lists of open source software.

https://github.com/vfsoraki/constants

An Elixir library to help you define constants easily
https://github.com/vfsoraki/constants

constants elixir library

Last synced: 10 months ago
JSON representation

An Elixir library to help you define constants easily

Awesome Lists containing this project

README

          

# Constants

A library to help you define constants easily.

# Usage

```elixir
defmodule Test do
use Constants

@name :aconst
@value "a value"

@name "anotherone"
@value "another value"
end

Test.aconst # => "a value"
Test.anotherone # => "another value"
```

## Installation

The package can be installed adding `constants` to your list of dependencies
in `mix.exs`:

```elixir
def deps do
[{:constants, "~> 0.1.0"}]
end
```