Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rconv

Parse transform for fast record to map and map to record conversions without boilerplate for Erlang.

Usage

Add dependency to your rebar.config

    {deps, [
        {rconv, {git, "https://github.com/Yozhig/rconv.git", {tag, "0.2.0"}}},
    ]}

and compile option for parse transform at the top of the source file

    -module(your_module_name).

    -compile([{parse_transform, rconv}]).

or to an erl_opts.

Now you can use rconv:to_map/2 and rconv:from_map/2 which will be transformed at the compile time

    Map = rconv:to_map(Record, your_record_name),
    Record = rconv:from_map(Map, your_record_name)

See unit tests for sample usage.

About

Fast record<->map conversions for Erlang

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages