Allen (allen v0.1.0) View Source

A read-only module constant pool

Installation

def deps do
  [
    {:allen, "~> 0.1.0"}
  ]
end

Usage

value = %{ab: 123, cd: 456}
Allen.put(:key, data)
^value = Allen.get(:key)

Link to this section Summary

Functions

Delete value stored at key, no-op if non-existent.

Get the value for key or return default

Store a value at key, replaces an existing term if present

Link to this section Functions

Specs

delete(atom()) :: boolean()

Delete value stored at key, no-op if non-existent.

Link to this function

get(key, default \\ nil)

View Source

Specs

get(atom(), any()) :: any() | nil

Get the value for key or return default

Specs

put(atom(), any()) :: :ok

Store a value at key, replaces an existing term if present