{"id":24938586,"url":"https://github.com/korkje/fifo","last_synced_at":"2025-04-15T06:56:28.433Z","repository":{"id":190252842,"uuid":"682228662","full_name":"korkje/fifo","owner":"korkje","description":"First-in-first-out queue","archived":false,"fork":false,"pushed_at":"2024-06-02T14:21:56.000Z","size":16,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T06:56:21.519Z","etag":null,"topics":["deno","queue","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/korkje.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2023-08-23T18:11:52.000Z","updated_at":"2025-01-01T01:54:12.000Z","dependencies_parsed_at":"2023-12-17T21:43:10.415Z","dependency_job_id":null,"html_url":"https://github.com/korkje/fifo","commit_stats":null,"previous_names":["korkje/fifo"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korkje%2Ffifo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korkje%2Ffifo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korkje%2Ffifo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/korkje%2Ffifo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/korkje","download_url":"https://codeload.github.com/korkje/fifo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023713,"owners_count":21199958,"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":["deno","queue","typescript"],"created_at":"2025-02-02T17:58:56.238Z","updated_at":"2025-04-15T06:56:28.415Z","avatar_url":"https://github.com/korkje.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fifo [![JSR](https://jsr.io/badges/@korkje/fifo)](https://jsr.io/@korkje/fifo)\n\nSimple and fast first-in-first-out queue.\n\n```ts\nimport FIFO from \"jsr:@korkje/fifo\";\n\nconst queue = new FIFO\u003cnumber\u003e();\n\nqueue.push(1);\nqueue.push(2);\nqueue.push(3);\n\nconsole.log(queue.length); // 3\n\nconsole.log(queue.shift()); // 1\nconsole.log(queue.shift()); // 2\nconsole.log(queue.shift()); // 3\n\nconsole.log(queue.shift()); // undefined\n```\n\nSupports both sync and async iteration.\n\n```ts\n// Consumes queue\nfor (const item of queue) {\n  console.log(item);\n}\n\n// Consumes queue, waits for new items\nfor await (const item of queue) {\n  console.log(item);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorkje%2Ffifo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkorkje%2Ffifo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkorkje%2Ffifo/lists"}