{"id":22750391,"url":"https://github.com/ruby2elixir/elixir_prelude","last_synced_at":"2025-04-14T13:02:09.166Z","repository":{"id":56841862,"uuid":"53334898","full_name":"ruby2elixir/elixir_prelude","owner":"ruby2elixir","description":"Small set of useful utility functions.","archived":false,"fork":false,"pushed_at":"2016-05-14T11:22:02.000Z","size":21,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-28T02:05:29.153Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/elixir_prelude/api-reference.html","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby2elixir.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-07T15:13:25.000Z","updated_at":"2019-03-10T21:31:54.000Z","dependencies_parsed_at":"2022-08-29T06:50:54.779Z","dependency_job_id":null,"html_url":"https://github.com/ruby2elixir/elixir_prelude","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby2elixir%2Felixir_prelude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby2elixir%2Felixir_prelude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby2elixir%2Felixir_prelude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby2elixir%2Felixir_prelude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby2elixir","download_url":"https://codeload.github.com/ruby2elixir/elixir_prelude/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497816,"owners_count":21113984,"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":[],"created_at":"2024-12-11T04:14:40.621Z","updated_at":"2025-04-14T13:02:09.138Z","avatar_url":"https://github.com/ruby2elixir.png","language":"Elixir","readme":"# Elixir Prelude\n\n[![Build status](https://travis-ci.org/ruby2elixir/elixir_prelude.svg \"Build status\")](https://travis-ci.org/ruby2elixir/elixir_prelude)\n[![Hex version](https://img.shields.io/hexpm/v/elixir_prelude.svg \"Hex version\")](https://hex.pm/packages/elixir_prelude)\n![Hex downloads](https://img.shields.io/hexpm/dt/elixir_prelude.svg \"Hex downloads\")\n\nSmall set of useful utility functions.\n\nForked to release on Hex.pm, see: https://github.com/houshuang/elixir-prelude/issues/1\n\n\n## Installation\n\n1. Add `elixir_prelude` to your list of dependencies in `mix.exs`:\n```elixir\ndef deps do\n  [{:elixir_prelude, \"~\u003e 0.2\"}]\nend\n```\n\n## Usage\n\nThe most useful utility is provided by Prelude.Map to work with deeply nested Maps or Structs.\n\n\n```elixir\ndefmodule Data do\n  defstruct data: %{}\nend\n\nPrelude.Map.deep_put(%Data{}, [:data, :b, :c, :d], 2)\n#=\u003e %Data{data: %{b: %{c: %{d: 2}}}}\n\nPrelude.Map.deep_get(%Data{data: %{b: %{c: %{d: 2}}}}, [:data, :b, :c, :d])\n#=\u003e 2\n\nPrelude.Map.del_in(%Data{data: %{b: %{c: %{d: 2}}}}, [:data, :b, :c, :d])\n#=\u003e %Data{data: %{b: %{c: %{}}}}\n```\n\nOther modules:\n  - Prelude.Atom\n  - Prelude.List\n  - Prelude.String\n\n\n\nThis package has a set of functions that I extracted from projects I worked on (mainly [this](https://github.com/houshuang/survey)). Some are very trivial, others (especially in the Prelude.Map module) are more involved. I am mainly putting it together for my own future reuse, but some of it might be useful to others. I would like to add tests, and I will keep adding functions as they come up. Pull requests or suggestions for new functions, better APIs etc are welcome (tests would be awesome).\n\nStian Håklev, shaklev@gmail.com, http://reganmian.net\n\n\nSee CHANGELOG.md for progress.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby2elixir%2Felixir_prelude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby2elixir%2Felixir_prelude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby2elixir%2Felixir_prelude/lists"}