blallo

blallo

DeepDive - a debugging tool for deeply nested data structures

Hi! This is my first public elixir library. I hope someone can benefit from it, as I ceased to work with this nice language at the moment.

DeepDive

Where

Github: GitHub - blallo/deep_dive: Debug utility to explore nested data structures in elixir
Hex.pm: deep_dive | Hex
Hexdocs.pm: DeepDive — Deep Dive v1.0.0

What

DeepDive is an extremely simple library to explore a complex and possibly unknown data structures in search of keys that sound. I developed an early stub to explore a deeply nested Absinthe.Resolution struct I needed to get hold of. It treats everything as a map and every map as a tree. It offers two different strategies to explore the tree in search for nodes (the keys) that match some pattern:

  • DeepDive.FirstFound looks for the first match on each branch and returns
  • DeepDive.FullWalk looks for each match on the whole tree

The interface is a single function, find_key/2, that wants the data structure as first argument and a matcher as second argument. A matcher may be:

  • an exact value to match
  • a regex
  • a function of kind (term -> bool)

Peek into the documentation for more info.

How

I used to put an IEx.pry() near the code I needed to examine and, from there, call the function on the data. I suggest to install the library only in the :dev mix environment.

Have fun and use the github issues to signal any problem.

Where Next?

Popular in Libraries Top

tmbb
I’ve been working on two packages (not on hex.pm yet) to build admin interfaces for phoenix apps: bureaucrat - which contains a bunch ...
New
hpopp
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
Crowdhailer
I have been updating a library that allows you to pipe between functions that use the erlang result tuple convention. Assuming you have...
New
benlime
LiveMotion enables high performance animations declared on the server and run on the client. As a follow up to my previous thread A libr...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
zorbash
I created Kitto a framework for dashboards inspired by Dashing. [demo] The distributed characteristics of Elixir and the low memory foo...
New
Eiji
ExApi is a library that I’m developing now and hope release soon This library will allow to: list all apis list all api implementation...
New
Antrater
Hi everyone! I’m thrilled to announce a huge thing. We have been developing Elixir Moon Design System for quite a while. We are finally ...
New
OvermindDL1
I created a new library (rather I pulled out a couple files from my big project), it manages an operating system PID file for the BEAM. ...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

Sub Categories:

We're in Beta

About us Mission Statement