{"id":16351609,"url":"https://github.com/tomeraberbach/quetie","last_synced_at":"2025-04-05T10:08:18.285Z","repository":{"id":50713487,"uuid":"380885864","full_name":"TomerAberbach/quetie","owner":"TomerAberbach","description":"🎀 Just the cutest and tiniest queue/deque implementation!","archived":false,"fork":false,"pushed_at":"2024-10-15T03:16:29.000Z","size":531,"stargazers_count":112,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T16:51:42.568Z","etag":null,"topics":["amortized-array","data-structures","deque","double-ended-queue","npm-module","npm-package","queue","stack"],"latest_commit_sha":null,"homepage":"https://npm.im/quetie","language":"JavaScript","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/TomerAberbach.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","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},"funding":{"github":"TomerAberbach"}},"created_at":"2021-06-28T02:40:45.000Z","updated_at":"2024-10-18T06:03:32.000Z","dependencies_parsed_at":"2024-01-02T23:23:10.342Z","dependency_job_id":"bad77e21-60e6-4724-93cf-00a11c07529c","html_url":"https://github.com/TomerAberbach/quetie","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/TomerAberbach%2Fquetie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fquetie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fquetie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomerAberbach%2Fquetie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomerAberbach","download_url":"https://codeload.github.com/TomerAberbach/quetie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318744,"owners_count":20919484,"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":["amortized-array","data-structures","deque","double-ended-queue","npm-module","npm-package","queue","stack"],"created_at":"2024-10-11T01:23:24.637Z","updated_at":"2025-04-05T10:08:18.264Z","avatar_url":"https://github.com/TomerAberbach.png","language":"JavaScript","funding_links":["https://github.com/sponsors/TomerAberbach"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  quetie\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://npmjs.org/package/quetie\"\u003e\n    \u003cimg src=\"https://badgen.now.sh/npm/v/quetie\" alt=\"version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/TomerAberbach/quetie/actions\"\u003e\n    \u003cimg src=\"https://github.com/TomerAberbach/quetie/workflows/CI/badge.svg\" alt=\"CI\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://unpkg.com/quetie/dist/index.min.js\"\u003e\n    \u003cimg src=\"https://deno.bundlejs.com/?q=quetie\u0026badge\" alt=\"gzip size\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://unpkg.com/quetie/dist/index.min.js\"\u003e\n    \u003cimg src=\"https://deno.bundlejs.com/?q=quetie\u0026config={%22compression%22:{%22type%22:%22brotli%22}}\u0026badge\" alt=\"brotli size\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/sponsors/TomerAberbach\"\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=%23fe8e86\" alt=\"Sponsor\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  Just the cutest and tiniest queue/deque implementation!\n\u003c/div\u003e\n\n## Features\n\n- **Tiny:** ~360 bytes minzipped!\n- **Fast:**\n  [amortized O(1) time complexity](https://en.wikipedia.org/wiki/Amortized_analysis)\n  for all operations\n- **Tree Shakeable:** use `Queue` if you don't need a full `Deque`!\n\n## Install\n\n```sh\n$ npm i quetie\n```\n\n## Usage\n\n```js\nimport { Deque, Queue } from 'quetie'\n\nconst queue = new Queue()\n\nqueue.push(1)\nqueue.push(2)\nqueue.push(3)\n\nconsole.log(queue.size)\n//=\u003e 3\n\nconsole.log(queue.at(0))\nconsole.log(queue.at(1))\nconsole.log(queue.at(2))\nconsole.log(queue.at(3))\nconsole.log(queue.at(-1))\n//=\u003e 1\n//=\u003e 2\n//=\u003e 3\n//=\u003e 1\n//=\u003e 3\n\nconsole.log([...queue])\n//=\u003e [ 1, 2, 3 ]\n\nconsole.log(queue.shift())\nconsole.log(queue.shift())\nconsole.log(queue.shift())\nconsole.log(queue.shift())\n//=\u003e 1\n//=\u003e 2\n//=\u003e 3\n//=\u003e undefined\n\nconst deque = new Deque()\n\ndeque.push(1)\ndeque.push(2)\ndeque.push(3)\ndeque.unshift(0)\n\nconsole.log(deque.size)\n//=\u003e 4\n\nconsole.log(deque.at(0))\nconsole.log(deque.at(1))\nconsole.log(deque.at(2))\nconsole.log(deque.at(3))\nconsole.log(deque.at(-1))\n//=\u003e 0\n//=\u003e 1\n//=\u003e 2\n//=\u003e 3\n//=\u003e 3\n\nconsole.log([...deque])\n//=\u003e [ 0, 1, 2, 3 ]\n\nconsole.log(deque.pop())\nconsole.log(deque.shift())\nconsole.log(deque.shift())\nconsole.log(deque.pop())\nconsole.log(deque.pop())\n//=\u003e 3\n//=\u003e 0\n//=\u003e 1\n//=\u003e 2\n//=\u003e undefined\n```\n\nSee the\n[type definitions](https://github.com/TomerAberbach/quetie/blob/main/src/index.d.ts)\nfor more documentation.\n\n## Contributing\n\nStars are always welcome!\n\nFor bugs and feature requests,\n[please create an issue](https://github.com/TomerAberbach/quetie/issues/new).\n\nFor pull requests, please read the\n[contributing guidelines](https://github.com/TomerAberbach/quetie/blob/master/contributing.md).\n\n## License\n\n[Apache 2.0](https://github.com/TomerAberbach/quetie/blob/master/license)\n\nThis is not an official Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomeraberbach%2Fquetie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomeraberbach%2Fquetie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomeraberbach%2Fquetie/lists"}