{"id":15502068,"url":"https://github.com/ankhers/argument_names","last_synced_at":"2025-03-28T18:19:03.204Z","repository":{"id":57478986,"uuid":"267701075","full_name":"ankhers/argument_names","owner":"ankhers","description":"An easy to use and pipe friendly way to have named arugments","archived":false,"fork":false,"pushed_at":"2020-06-04T19:05:09.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T21:19:37.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ankhers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-28T21:32:11.000Z","updated_at":"2020-06-04T19:05:11.000Z","dependencies_parsed_at":"2022-09-17T04:31:40.349Z","dependency_job_id":null,"html_url":"https://github.com/ankhers/argument_names","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/ankhers%2Fargument_names","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankhers%2Fargument_names/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankhers%2Fargument_names/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankhers%2Fargument_names/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankhers","download_url":"https://codeload.github.com/ankhers/argument_names/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246076931,"owners_count":20719894,"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-10-02T09:07:35.532Z","updated_at":"2025-03-28T18:19:03.183Z","avatar_url":"https://github.com/ankhers.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Argument Names\n\nAn easy to use and pipe friendly way to have named arguments\n\n## Examples\n\nSuppose we have the following module\n\n```elixir\ndefmodule Foo do\n  require ArgumentNames\n  import ArgumentNames\n  \n  defnamed div(first, second) do\n    first / second\n  end\nend\n```\n\nWe can then start using the `first` and `second` names within our function calls.\n\n```elixir\nrequire Foo\nFoo.div(second ~\u003e 4, 2) =\u003e 0.5\n```\n\nWe can also use this with pipes in order to change around our argument order\n\n```elixir\n4 |\u003e Foo.div(first ~\u003e 2) =\u003e 0.5\n2 |\u003e Foo.div(second ~\u003e 4) =\u003e 0.5\n```\n\nWe can also use this function with pipes without having to name the arguments\n\n```elixir\n2 |\u003e Foo.div(4) =\u003e 0.5\n```\n\n## Roadmap\n\nThese are just a couple things I would like to see added to this package in no particular order\n\n* Default arguments\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `argument_names` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:argument_names, \"~\u003e 0.2.0\"}\n  ]\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankhers%2Fargument_names","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankhers%2Fargument_names","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankhers%2Fargument_names/lists"}