Babel - Data transformations made easy

Sorry, but your example does not looks really good …

%{
  "some" => %{
    "nested" => %{
      "path" => [
        %{"string-key" => :value2},
        %{"string-key" => :value2},
        %{"string-key" => :value2}
      ]
    }
  }
}
|> get_in(~w[some nested path])
|> Enum.map(&%{atom_key: &1["string-key"]})
  1. Shorter syntax
  2. No dependencies
  3. I guess that the Elixir language and related hex packages maintained by core team members are as fast as other packages if not faster

Later in the main module’s documentation the Error handling is mentioned, but in this case all we have to do is to change a getter function like:

%{
  "some" => %{
    "nested" => %{
      "path" => [
        %{"string-key" => :value2},
        %{"string-keyy" => :value2},
        %{"string-key" => :value2}
      ]
    }
  }
}
|> get_in(~w[some nested path])
|> Enum.map(&%{atom_key: Map.fetch!(&1, "string-key")})
  1. Do exactly same error handling
  2. Uses well known KeyError and it’s message
  3. Babel.fetch/1 is confusing as it does not uses a trailing bang naming convention

So far I did not found anything in documentation which is not handled by Enum, Map, List, Kernel and Access modules.