{"id":15502029,"url":"https://github.com/prodis/miss-elixir","last_synced_at":"2025-04-14T12:41:51.463Z","repository":{"id":43119626,"uuid":"208326019","full_name":"prodis/miss-elixir","owner":"prodis","description":"Some functions that I miss in Elixir standard library (and maybe you too).","archived":false,"fork":false,"pushed_at":"2022-03-17T10:56:14.000Z","size":383,"stargazers_count":42,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T01:53:27.602Z","etag":null,"topics":["elixir","elixir-lang","prodis"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prodis.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}},"created_at":"2019-09-13T18:43:39.000Z","updated_at":"2024-12-17T09:38:07.000Z","dependencies_parsed_at":"2022-09-18T04:40:27.038Z","dependency_job_id":null,"html_url":"https://github.com/prodis/miss-elixir","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodis%2Fmiss-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodis%2Fmiss-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodis%2Fmiss-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prodis%2Fmiss-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prodis","download_url":"https://codeload.github.com/prodis/miss-elixir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248691417,"owners_count":21146347,"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":["elixir","elixir-lang","prodis"],"created_at":"2024-10-02T09:07:13.001Z","updated_at":"2025-04-14T12:41:51.419Z","avatar_url":"https://github.com/prodis.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Miss Elixir\n\nSome functions that ***I miss*** in Elixir standard library (and maybe you too).\n\n\u003cimg height=\"300\" src=\"https://raw.githubusercontent.com/prodis/miss-elixir/master/assets/miss-elixir-logo.jpg\" alt=\"Miss Elixir\"\u003e\n\n---\n\n[![Hex.pm](https://img.shields.io/hexpm/v/miss.svg)](https://hex.pm/packages/miss)\n[![Docs](https://img.shields.io/badge/hex-docs-542581.svg)](https://hexdocs.pm/miss)\n[![Build Status](https://travis-ci.org/prodis/miss-elixir.svg?branch=master)](https://travis-ci.org/prodis/miss-elixir)\n[![Coverage Status](https://coveralls.io/repos/github/prodis/miss-elixir/badge.svg?branch=master)](https://coveralls.io/github/prodis/miss-elixir?branch=master)\n[![License](https://img.shields.io/hexpm/l/miss.svg)](https://github.com/prodis/miss-elixir/blob/master/LICENSE)\n\n*Miss Elixir* library brings in a non-intrusive way some extra functions that, for different reasons, are not part of the Elixir\nstandard library.\n\nNone of the functions in *Miss Elixir* has the same name of functions present in the correspondent Elixir module.\n\nRead about the motivation to create this Elixir library in [this blog post](https://fernandohamasaki.com/miss-elixir).\n\n## Installation\n\nThe package can be installed by adding `miss` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:miss, \"~\u003e 0.1.5\"}\n  ]\nend\n```\n\n## Usage\n\nThe order of the `Miss` namespace preceding the existing Elixir modules to be extended was made by intention. For example,\n`Miss.String`.\n\nThe modules in *Miss Elixir* are not intended to be used with aliases. Always use the entire namespace to make explicit that\nmodule/function does not belong to Elixir standard library.\n\n```elixir\n# Do not do that!\nalias Miss.Kernel\nKernel.div_rem(10, 2)\n\n# Instead, use like that:\nMiss.Kernel.div_rem(10, 2)\n```\n\n\u003e Navigate in the [documentation of each module](https://hexdocs.pm/miss/api-reference.html) to find out all the available\n\u003e functions and detailed examples.\n\nBelow there are some examples.\n\n### String\n\n```elixir\niex\u003e Miss.String.build([\"string\", 123, true])\n\"string123true\"\n\niex\u003e Miss.String.build(\"What \", \"do you\", \" miss?\")\n\"What do you miss?\"\n```\n\n### Map\n\n```elixir\niex\u003e Miss.Map.rename_key(%{a: 1, b: 2, c: 3}, :b, :bbb)\n%{a: 1, bbb: 2, c: 3}\n\niex\u003e defmodule Post do\n...\u003e   defstruct [:title, :text, :date, :author, comments: []]\n...\u003e  end\n...\u003e\n...\u003e  defmodule Author do\n...\u003e    defstruct [:id, :name]\n...\u003e  end\n...\u003e\n...\u003e  defmodule Comment do\n...\u003e    defstruct [:text]\n...\u003e  end\n...\u003e\n...\u003e post = %Post{\n...\u003e   title: \"My post\",\n...\u003e   text: \"Something really interesting\",\n...\u003e   date: ~D[2010-09-01],\n...\u003e   author: %Author{\n...\u003e     id: 1234,\n...\u003e     name: \"Pedro Bonamides\"\n...\u003e   },\n...\u003e   comments: [\n...\u003e     %Comment{text: \"Comment one\"},\n...\u003e     %Comment{text: \"Comment two\"}\n...\u003e   ]\n...\u003e }\n...\u003e Miss.Map.from_nested_struct(post, [{Date, :skip}])\n%{\n  title: \"My post\",\n  text: \"Something really interesting\",\n  date: ~D[2010-09-01],\n  author: %{\n    id: 1234,\n    name: \"Pedro Bonamides\"\n  },\n  comments: [\n    %{text: \"Comment one\"},\n    %{text: \"Comment two\"}\n  ]\n}\n```\n\n### Kernel\n\n```elixir\niex\u003e Miss.Kernel.div_rem(45, 2)\n{22, 1}\n\niex\u003e defmodule User do\n...\u003e   defstruct name: \"User\"\n...\u003e end\n...\u003e\n...\u003e Miss.Kernel.struct_list(User, [%{name: \"Akira\"}, %{name: \"Fernando\"}])\n[%User{name: \"Akira\"}, %User{name: \"Fernando\"}]\n```\n\n### List\n\n```elixir\niex\u003e Miss.List.intersection([1, 2, 3, 4, 5], [0, 2, 4, 6, 8])\n[2, 4]\n```\n\n## Full documentation\n\nThe full documentation is available at [https://hexdocs.pm/miss](https://hexdocs.pm/miss).\n\n## Contributing\n\nSee the [contributing guide](https://github.com/prodis/miss-elixir/blob/master/CONTRIBUTING.md).\n\n## License\n\n*Miss Elixir* is released under the Apache 2.0 License. See the [LICENSE](https://github.com/prodis/miss-elixir/blob/master/LICENSE) file.\n\nCopyright © 2020-2021 Fernando Hamasaki de Amorim\n\n## Author\n\n[Fernando Hamasaki de Amorim (prodis)](https://github.com/prodis)\n\n\u003ca href=\"https://fernandohamasaki.com\" title=\"Prodis' Blog\" target=\"_blank\"\u003e\u003cimg height=\"102\" width=\"151\" src=\"https://raw.githubusercontent.com/prodis/prodis/master/prodis.png\" alt=\"Prodis\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodis%2Fmiss-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprodis%2Fmiss-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodis%2Fmiss-elixir/lists"}