{"id":16413096,"url":"https://github.com/groguelon/ex_array","last_synced_at":"2025-10-26T19:31:01.556Z","repository":{"id":153805576,"uuid":"630751700","full_name":"GRoguelon/ex_array","owner":"GRoguelon","description":"A wrapper module for Erlang's array.","archived":false,"fork":false,"pushed_at":"2024-01-16T22:04:32.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T22:41:20.585Z","etag":null,"topics":["array","elixir"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/ex_array","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/GRoguelon.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-04-21T04:28:40.000Z","updated_at":"2024-07-17T13:46:42.000Z","dependencies_parsed_at":"2023-05-30T15:45:54.769Z","dependency_job_id":null,"html_url":"https://github.com/GRoguelon/ex_array","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GRoguelon%2Fex_array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GRoguelon%2Fex_array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GRoguelon%2Fex_array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GRoguelon%2Fex_array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GRoguelon","download_url":"https://codeload.github.com/GRoguelon/ex_array/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238386412,"owners_count":19463360,"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":["array","elixir"],"created_at":"2024-10-11T06:50:35.677Z","updated_at":"2025-10-26T19:31:00.378Z","avatar_url":"https://github.com/GRoguelon.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExArray\n\nA wrapper module for Erlang's array.\n\n## Installation\n\nRequires Elixir v1.14+:\n\n```elixir\ndef deps do\n  [\n    {:ex_array, \"~\u003e 0.1.3\"}\n  ]\nend\n```\n\nDocumentation can be found at: \u003chttps://hexdocs.pm/ex_array\u003e.\n\n## Usage\n\n### Initialization\n\nWithout options, `ExArray` fallbacks on:\n* `size`: 0\n* `default`: `nil`\n* `fixed`: `false`\n\n```elixir\nExArray.new()\n#=\u003e #ExArray\u003c[], fixed=false, default=nil\u003e\n\nExArray.new(5)\n#=\u003e #ExArray\u003c[nil, nil, nil, nil, nil], fixed=true, default=nil\u003e\n```\n\nYou can provide options to change defaults:\n```elixir\nExArray.new(size: 5, default: 0, fixed: false)\n#=\u003e #ExArray\u003c[0, 0, 0, 0, 0], fixed=false, default=0\u003e\n```\n\n*Note:* When you specify a `size`, the array is automatically `fixed`.\n\n### Setter\n\n```elixir\narr = ExArray.new(size: 5, default: 0, fixed: false)\n\narr = ExArray.set(arr, 1, \"Hello\")\n#=\u003e #ExArray\u003c[0, \"Hello\", 0, 0, 0], fixed=false, default=0\u003e\n\nExArray.reset(arr, 1)\n#=\u003e #ExArray\u003c[0, 0, 0, 0, 0], fixed=false, default=0\u003e\n```\n\n### Getter\n\n```elixir\narr = ExArray.new() |\u003e ExArray.set(1, \"Hello\")\n\nExArray.get(arr, 0)\n#=\u003e nil\n\nExArray.get(arr, 1)\n#=\u003e \"Hello\"\n\nExArray.size(arr)\n#=\u003e 2\n```\n\n### Convertions\n\n```elixir\narr = ExArray.new(3) |\u003e ExArray.set(1, \"Hello\")\n\nExArray.to_list(arr)\n#=\u003e [nil, \"5\", nil]\n\nExArray.sparse_to_list(arr)\n#=\u003e [\"Hello\"]\n\nExArray.to_orddict(arr)\n#=\u003e [{0, nil}, {1, \"Hello\"}, {2, nil}]\n\nExArray.sparse_to_orddict(arr)\n#=\u003e [{1, \"Hello\"}]\n```\n\n## Acknowledgments\n\nThis package is a fork of [takscape/elixir-array](https://github.com/takscape/elixir-array). The latest commit was in 2014 and the compilation was broken with recent versions of Elixir.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroguelon%2Fex_array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroguelon%2Fex_array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroguelon%2Fex_array/lists"}