{"id":24609413,"url":"https://github.com/treble37/digger","last_synced_at":"2025-05-05T23:46:18.769Z","repository":{"id":25143902,"uuid":"103290780","full_name":"treble37/digger","owner":"treble37","description":"Influenced by Rails Activesupport::Inflector, Digger uses protocols to handle some common data transformation operations such as snake_casing, camelCasing, lower/upper casing the first letter, converting strings to atoms and other operations I've found myself doing in Elixir","archived":false,"fork":false,"pushed_at":"2023-12-25T13:44:34.000Z","size":153,"stargazers_count":6,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T02:33:39.122Z","etag":null,"topics":["digger","elixir","elixir-library","hacktoberfest","nested-maps"],"latest_commit_sha":null,"homepage":"https://github.com/treble37/digger","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treble37.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-09-12T15:48:46.000Z","updated_at":"2023-03-05T08:18:31.000Z","dependencies_parsed_at":"2023-02-14T07:35:13.886Z","dependency_job_id":"8f5e976a-63f4-4e69-b418-72b0af67d09b","html_url":"https://github.com/treble37/digger","commit_stats":{"total_commits":101,"total_committers":4,"mean_commits":25.25,"dds":"0.20792079207920788","last_synced_commit":"42ee96e5e1a6fc7f9a1b10dd0210d19fa3cdb46b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treble37%2Fdigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treble37%2Fdigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treble37%2Fdigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treble37%2Fdigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treble37","download_url":"https://codeload.github.com/treble37/digger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596328,"owners_count":21773842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digger","elixir","elixir-library","hacktoberfest","nested-maps"],"created_at":"2025-01-24T18:14:42.131Z","updated_at":"2025-05-05T23:46:18.740Z","avatar_url":"https://github.com/treble37.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digger\n\n![Build](https://github.com/treble37/digger/actions/workflows/digger_ci.yml/badge.svg?branch=main)\n[![Coverage Status](https://coveralls.io/repos/github/treble37/digger/badge.svg)](https://coveralls.io/github/treble37/digger)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/702151ab4712380d7d49/test_coverage)](https://codeclimate.com/github/treble37/digger/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/702151ab4712380d7d49/maintainability)](https://codeclimate.com/github/treble37/digger/maintainability)\n[![Hex.pm](https://img.shields.io/hexpm/v/digger.svg)](https://hex.pm/packages/digger)\n[![Hex.pm Downloads](https://img.shields.io/hexpm/dt/digger.svg)](https://hex.pm/packages/digger)\n[![Inline docs](http://inch-ci.org/github/treble37/digger.svg?branch=master)](http://inch-ci.org/github/treble37/digger)\n[![GitHub stars](https://img.shields.io/github/stars/treble37/digger.svg)](https://github.com/treble37/digger/stargazers)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/treble37/digger/master/LICENSE)\n\n## Description\n\nDigger is a collection of helpers to help you operate on nested maps (it will also work on non-nested maps). Elixir gives you a great collection of map methods, but sometimes I find myself having to rewrite the same operations specifically for nested maps.\n\nThis library is intended to help your code stay [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself).\n\n## Possible Future Work\n\nThis library is a work in progress. I'm thinking about extending it to lists and/or tuples.\n\n## Here is a list of helper methods Digger gives you:\n\n## 1 - Digger.atomize/2\n\n### The Problem\n\nYou have a valid data type that needs to be \"atomized\" This can be a string, number, or nested map with string keys.\n\n### The Solution\n\nDigger.atomize/2 drills down into a nested map and converts (most) keys which are not atoms into atoms.\n\n## 2 - Digger.stringify/2\n\n### The Problem\n\nYou have a nested map (or a struct that you converted to a nested map) with keys that are atoms and you want to convert those keys to strings.\n\nYou have a valid data type that needs to be \"stringified\" This can be an atom, number, or nested map with atom keys.\n\n### The Solution\n\nDigger.stringify/2 drills down into a nested map and converts (most) keys which are not strings into strings.\n\n## 3 - Digger.camel_case/2\n\n### The Problem\n\nYou have a valid data type that needs to be camel-cased. This can be an atom, string, or nested map (or a struct that you converted to a nested map) with string or atom keys.\n\n### The Solution\n\nDigger.camel_case/2 \"camel cases\" your valid data type according to the rules defined by its protocol.\n\n## 4 - Digger.snake_case/2\n\n### The Problem\n\nYou have a valid data type that needs to be snake-cased. This can be an atom, string, or nested map (or a struct that you converted to a nested map) with string or atom keys.\n\n### The Solution\n\nDigger.snake_case/2 \"snake cases\" your valid data type according to the rules defined by its protocol.\n\n## 5 - Digger.dasher/2\n\n### The Problem\n\nYou have a valid data type that needs the underscores transformed to dashes. This can be a string, or nested map (or a struct that you converted to a nested map) with string keys.\n\n### The Solution\n\nDigger.dasher/2 \"dasherizes\" your valid data type according to the rules defined by its protocol.\n\n## 6 - Digger.lowercase_first/2\n\n### The Problem\n\nYou have a valid data type that needs the first letter to be lowercase. This can be a string or atom or nested map with string or atom keys.\n\n### The Solution\n\nDigger.lowercase_first/2 \"lowercases\" your valid data type according to the rules defined by its protocol.\n\n## 7 - Digger.upcase_first/2\n\n### The Problem\n\nYou have a valid data type that needs the first letter to be upper case. This can be a string or atom or nested map with string or atom keys.\n\n### The Solution\n\nDigger.upcase_first/2 \"upcases\" your valid data type according to the rules defined by its protocol.\n\n## Questions?\n\nThe tests in the test folder show you the data types that are handled. The protocol implementations in lib/impl also show you the various data types are handled.\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `digger` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:digger, \"~\u003e 3.0.0\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at \u003chttps://hexdocs.pm/digger\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreble37%2Fdigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreble37%2Fdigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreble37%2Fdigger/lists"}