Yamel

CICoverage StatusDocsHex.pm

An yaml parser and serializer to work with Yaml files in Elixir.

WELCOME HACKTOBERFEST PARTYPEOPLE!! πŸŽ‰πŸŽŠπŸ₯³πŸ‘©πŸΏβ€πŸ’»πŸ‘©πŸΎβ€πŸ’»πŸ‘©πŸ½β€πŸ’»πŸ‘©πŸΌβ€πŸ’»πŸ‘©πŸ»β€πŸ’»πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»πŸ‘¨πŸ»β€πŸ’»πŸ‘¨πŸΌβ€πŸ’»πŸ‘¨πŸ½β€πŸ’»πŸ‘¨πŸΎβ€πŸ’»πŸ‘¨πŸΏβ€πŸ’»

Here are some few things I'd like to ask you beforehand for this event!

Basic Code of Conduct
  1. Be nice to other people, no matter what, should you interact with anyone.
  2. Open short, but meaningful and valuable, PR(s). This way is easier to review on time.
    • E.g.: Instead of document a whole module, you can document just one function, for instance. This goes with the Quality over Quantity value from Hacktoberfest.
  3. This is a fresh repository which I'm already using in production. I apologize for the lack of more information but feel free to interact with me through the Issues or twitter with the hashtag #elixirJenkiexs.

We appreciate your collaboration! Thank you very much!! πŸ™πŸΏπŸ™πŸΎπŸ™πŸ½πŸ™πŸΌπŸ™πŸ»πŸ™βœ¨

Installation

Add yamel to your list of dependencies in mix.exs:

def deps do
  [
    {:yamel, "~> 1.0.3"}
  ]
end

Usage

yaml_string = ~S"""
foo: bar
zoo:
  - caa
  - boo
  - vee
"""

Yamel.decode!(yaml_string)
=> %{"foo" => "bar", "zoo" => ["caa", "boo", "vee"]}

Yamel.encode!(["caa", :boo, :"\"foo\""])
=> "- caa\n- boo\n- \"foo\"\n\n"

%{foo: :bar, zoo: :caa}
|> Yamel.encode!()
|> Yamel.IO.write!("/to/file.yml")
=> :ok

%{foo: value} = Yamel.IO.read!("/from/file.yaml")