{"id":21089141,"url":"https://github.com/ngnjs/queue","last_synced_at":"2025-05-16T11:32:55.901Z","repository":{"id":57130680,"uuid":"282374869","full_name":"ngnjs/queue","owner":"ngnjs","description":"A queue plugin for NGN","archived":false,"fork":false,"pushed_at":"2022-02-28T22:25:55.000Z","size":63,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-19T23:04:18.115Z","etag":null,"topics":["async","browser","deno","javascript","ngn","nodejs","queue","sync","web"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ngnjs.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}},"created_at":"2020-07-25T05:06:57.000Z","updated_at":"2021-12-18T18:24:24.000Z","dependencies_parsed_at":"2022-08-31T20:01:02.902Z","dependency_job_id":null,"html_url":"https://github.com/ngnjs/queue","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngnjs%2Fqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngnjs%2Fqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngnjs%2Fqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngnjs%2Fqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngnjs","download_url":"https://codeload.github.com/ngnjs/queue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254522547,"owners_count":22085148,"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":["async","browser","deno","javascript","ngn","nodejs","queue","sync","web"],"created_at":"2024-11-19T21:23:40.975Z","updated_at":"2025-05-16T11:32:52.049Z","avatar_url":"https://github.com/ngnjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eNGN Queue\u003cbr/\u003e\u003cimg src=\"https://img.shields.io/npm/v/@ngnjs/queue?label=%40ngnjs/queue\u0026logo=npm\u0026style=social\"/\u003e\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\u003cem\u003eA plugin for \u003ca href=\"https://github.com/ngnjs/ngn\"\u003eNGN\u003c/a\u003e\u003c/em\u003e\u003c/div\u003e\u003cbr/\u003e\n\nThe NGN Queue is a collection of functions, stored in the order they're added t othe collection. \"Running\" a queue executes these functions, in parallel or sequentially.\n\nDocumentation for this plugin does not exist yet, but the inline comments in the code are thorough. The unit tests provide use cases, and a series of live examples are available on [codepen](https://codepen.io/coreybutler/pen/eYZQJqL).\n\nThe fundamental/basic example:\n\n```javascript\nimport NGN from 'https://cdn.jsdelivr.net/npm/ngn@latest/index.js'\nimport Queue from 'https://cdn.jsdelivr.net/npm/@ngnjs/queue/index.js'\n\nconst tasks = new Queue()\n\ntasks.add(function () {\n  console.log('Run task 1')\n})\n\ntasks.add(next =\u003e {\n  setTimeout(() =\u003e {\n    console.log('Run async task.')\n    next()\n  }, 300)\n})\n\ntasks.add('t3', function () {\n  console.log('Run task named ' + this.name)\n})\n\ntasks.on('end', function () {\n  console.log('All Done!')\n})\n\ntasks.runSync()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngnjs%2Fqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngnjs%2Fqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngnjs%2Fqueue/lists"}