{"id":13507304,"url":"https://github.com/seantanly/elixir-minmaxlist","last_synced_at":"2026-02-22T10:34:04.891Z","repository":{"id":57526906,"uuid":"45332178","full_name":"seantanly/elixir-minmaxlist","owner":"seantanly","description":"Extension of Enum functions like min_by, max_by, min_max_by, returning a list of results instead of just one.","archived":false,"fork":false,"pushed_at":"2018-02-25T07:31:53.000Z","size":117,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-15T12:10:06.383Z","etag":null,"topics":["elixir-library"],"latest_commit_sha":null,"homepage":null,"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/seantanly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-01T07:46:19.000Z","updated_at":"2018-01-28T18:36:42.000Z","dependencies_parsed_at":"2022-09-07T05:31:03.125Z","dependency_job_id":null,"html_url":"https://github.com/seantanly/elixir-minmaxlist","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/seantanly/elixir-minmaxlist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seantanly%2Felixir-minmaxlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seantanly%2Felixir-minmaxlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seantanly%2Felixir-minmaxlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seantanly%2Felixir-minmaxlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seantanly","download_url":"https://codeload.github.com/seantanly/elixir-minmaxlist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seantanly%2Felixir-minmaxlist/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280283550,"owners_count":26304125,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-library"],"created_at":"2024-08-01T02:00:30.709Z","updated_at":"2025-10-21T15:19:12.845Z","avatar_url":"https://github.com/seantanly.png","language":"Elixir","funding_links":[],"categories":["Algorithms and Data structures"],"sub_categories":[],"readme":"Minmaxlist\n========\n[![Build Status](https://travis-ci.org/seantanly/elixir-minmaxlist.svg?branch=master)](https://travis-ci.org/seantanly/elixir-minmaxlist)\n[![Hex.pm Version](http://img.shields.io/hexpm/v/minmaxlist.svg?style=flat)](https://hex.pm/packages/minmaxlist)\n\nElixir library extending `Enum.min_by/2`, `Enum.max_by/2` and `Enum.min_max_by/2` to return a list of results instead of just one.\n\nThis enables searching for all matching results based multiple min/max value criteria. See [Examples](#examples).\n\n\n## Documentation\n\nAPI documentation is available at [http://hexdocs.pm/minmaxlist](http://hexdocs.pm/minmaxlist)\n\n## Adding Minmaxlist To Your Project\n\nTo use Minmaxlist with your projects, edit your `mix.exs` file and add it as a dependency:\n\n```elixir\ndefp deps do\n  [\n    {:minmaxlist, \"~\u003e x.x.x\"},\n  ]\nend\n```\n\n## Examples\n\nMinmaxlist is designed to assist in filtering result sets by min/max value while returning list of results that matches the requirement. This is especially useful for example,\n\n\nFind the youngest people with highest income.\n\n```elixir\nimport Minmaxlist\n[\n  %{name: \"A\", age: 24, income: 4000},\n  %{name: \"B\", age: 22, income: 3300},\n  %{name: \"C\", age: 22, income: 2800},\n  %{name: \"D\", age: 25, income: 5000},\n  %{name: \"E\", age: 22, income: 3300},\n  %{name: \"F\", age: 25, income: 5500},\n  %{name: \"G\", age: 24, income: 4500},\n] |\u003e min_list_by(\u0026(\u00261.age)) |\u003e max_list_by(\u0026(\u00261.income))\n# =\u003e [%{name: \"B\", age: 22, income: 3300}, %{name: \"E\", age: 22, income: 3300}]\n```\n\nFind the youngest and oldest people,\n\n```elixir\nimport Minmaxlist\n[\n  %{name: \"A\", age: 24, income: 4000},\n  %{name: \"B\", age: 22, income: 3300},\n  %{name: \"C\", age: 22, income: 2800},\n  %{name: \"D\", age: 25, income: 5000},\n  %{name: \"E\", age: 22, income: 3300},\n  %{name: \"F\", age: 25, income: 5500},\n  %{name: \"G\", age: 24, income: 4500},\n] |\u003e min_max_list_by(\u0026(\u00261.age))\n# =\u003e {\n#   [%{name: \"B\", age: 22, income: 3300}, %{name: \"C\", age: 22, income: 2800}, %{name: \"E\", age: 22, income: 3300}],\n#   [%{name: \"D\", age: 25, income: 5000}, %{name: \"F\", age: 25, income: 5500}]\n# }\n```\n\n## LICENSE\n\nThis software is licensed under [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseantanly%2Felixir-minmaxlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseantanly%2Felixir-minmaxlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseantanly%2Felixir-minmaxlist/lists"}