abacus icon indicating copy to clipboard operation
abacus copied to clipboard

Abacus is a tool to simplify the handling of units

Hi, I'm currently working on a new lib. A better experience, with more functionalities !

Checkout Mizur, the new approach of the Unit Handler problem (but it is still in progress)

Abacus

Abacus is a module for transforming other modules into metric systems.

For example :

defmodule Length do 
  use Abacus.SystemMetric
  unit :cm 
  unit :mm, (1/10)
  unit :dm, 10
  unit :m,  100
  unit :km, 100000
end

defmodule Money do 
  use Abacus.SystemMetric
  unit :euro
  unit :dollar, 1.06665
end

These modules make it possible to use functions to create values enclosed in a metric system and functions to manipulate these values.

For example :

You can see the documentation here :

xvw.github.io/abacus/index.html

Installation

If available in Hex, the package can be installed by adding abacus to your list of dependencies in mix.exs:

def deps do
  [{:abacus_sm, "~> 1.0.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/abacus_sm.