{"id":15041871,"url":"https://github.com/discord/deque","last_synced_at":"2026-03-07T09:04:27.049Z","repository":{"id":49351998,"uuid":"82106234","full_name":"discord/deque","owner":"discord","description":"Fast bounded deque using two rotating lists.","archived":false,"fork":false,"pushed_at":"2023-05-31T02:35:12.000Z","size":12,"stargazers_count":156,"open_issues_count":4,"forks_count":15,"subscribers_count":173,"default_branch":"master","last_synced_at":"2026-01-14T07:34:23.075Z","etag":null,"topics":["datastructures","elixir"],"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/discord.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-15T21:00:12.000Z","updated_at":"2026-01-09T15:09:41.000Z","dependencies_parsed_at":"2024-06-19T01:35:20.644Z","dependency_job_id":"3c7ab914-3db3-4c52-a1b9-ce36de96be67","html_url":"https://github.com/discord/deque","commit_stats":null,"previous_names":["discordapp/deque"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/discord/deque","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord%2Fdeque","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord%2Fdeque/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord%2Fdeque/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord%2Fdeque/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discord","download_url":"https://codeload.github.com/discord/deque/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord%2Fdeque/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30210383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T09:02:10.694Z","status":"ssl_error","status_checked_at":"2026-03-07T09:02:08.429Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["datastructures","elixir"],"created_at":"2024-09-24T20:46:35.011Z","updated_at":"2026-03-07T09:04:26.989Z","avatar_url":"https://github.com/discord.png","language":"Elixir","readme":"# Deque\n\n[![Master](https://travis-ci.org/discordapp/deque.svg?branch=master)](https://travis-ci.org/discordapp/deque)\n[![Hex.pm Version](http://img.shields.io/hexpm/v/deque.svg?style=flat)](https://hex.pm/packages/deque)\n\nErlang only supports fast prepends to lists while appending requires a full copy. Getting the size of a list is also a\n`O(n)` operation. This library implements a deque using two rotating lists to support fast append and prepend as well as\n`O(1)` size via an internal counter.\n\n## Features\n\n- Bounded size\n- `Enumerable` protocol\n- `Collectable` protocol\n- `Inspect` protocol\n\n## Usage\n\nAdd it to `mix.exs`\n\n```elixir\ndefp deps do\n  [{:deque, \"~\u003e 1.0\"}]\nend\n```\n\nThen use it like other Elixir data structures.\n\n```elixir\n# Deque\u003c[3, 2, 1]\u003e\ndeque =\n  Deque.new(5)\n  |\u003e Deque.appendleft(1)\n  |\u003e Deque.appendleft(2)\n  |\u003e Deque.appendleft(3)\n\n# Deque\u003c[2, 1]\u003e\n{3, deque} = Deque.popleft(deque)\n\n# Deque\u003c[6, 7, 8, 9, 10]\u003e\nEnum.into(0..10, Deque.new(5))\n```\n\n## License\n\nDeque is released under [the MIT License](LICENSE).\nCheck [LICENSE](LICENSE) file for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscord%2Fdeque","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscord%2Fdeque","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscord%2Fdeque/lists"}