Hi folks,
Here is a utility library, hope that it would be a useful companion to your coding experience.
While working an another library I’ve found myself browsing thru output of structs containing a lot of irrelevant values, like nil, empty string, empty list, etc. I’ve made a simple filtering and I liked the cleaner output, so I convert those bits into this library.
StructInspect allows filtering fields by its value, not by its name (can do that too). You can decide wether to output nil values, empty strings, empty lists, empty tuples, zero values, boolean values (false or true) and empty structs (that is an interesting topic, clearly described in the documentation)
The usage is very simple just use StructInspect.
It can be possible to override existing dependencies structs, like, for example Phoenix.LiveView.Socket.
The Map module can be override. Overriding of existing modules are defined in configuration files.
Details on how to use StructInspect can be found here.
https://github.com/wadvanced/struct_inspect
Enjoy






















