Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhanberg/const
Constants for Elixir!
https://github.com/mhanberg/const
Last synced: about 1 month ago
JSON representation
Constants for Elixir!
- Host: GitHub
- URL: https://github.com/mhanberg/const
- Owner: mhanberg
- Created: 2023-03-03T16:44:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-03T17:28:12.000Z (over 1 year ago)
- Last Synced: 2024-05-01T13:52:26.406Z (7 months ago)
- Language: Elixir
- Homepage:
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Const
Adds constants to Elixir!
```elixir
defmodule TopBlogs do
use Constdefk BEST_BLOG, "https://mitchellhanberg.com"
def the_best?() do
~k"BEST_BLOG"
end
enddefmodule TopBlogs.Blogs do
use Constdef list do
~k"BEST_BLOG"TopBlogs
end
end
```## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `const` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:const, "~> 0.1.0"}
]
end
```Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at .