{"id":19602645,"url":"https://github.com/qiwi/queuefy","last_synced_at":"2025-04-27T17:32:18.874Z","repository":{"id":42881604,"uuid":"264631252","full_name":"qiwi/queuefy","owner":"qiwi","description":"Wrapper to make any async handler act like a single thread with a queue","archived":false,"fork":false,"pushed_at":"2025-04-05T01:55:53.000Z","size":989,"stargazers_count":1,"open_issues_count":11,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-21T07:42:36.743Z","etag":null,"topics":["utils"],"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/qiwi.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-17T09:52:15.000Z","updated_at":"2023-09-20T23:31:03.000Z","dependencies_parsed_at":"2024-04-04T21:29:50.050Z","dependency_job_id":"72ee5385-fa78-4bd7-9025-880669dd37d7","html_url":"https://github.com/qiwi/queuefy","commit_stats":{"total_commits":55,"total_committers":7,"mean_commits":7.857142857142857,"dds":0.7090909090909091,"last_synced_commit":"bff89906064ff7eee49c3155ab87db0481421ec2"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiwi%2Fqueuefy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiwi%2Fqueuefy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiwi%2Fqueuefy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qiwi%2Fqueuefy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qiwi","download_url":"https://codeload.github.com/qiwi/queuefy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251178027,"owners_count":21548148,"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":["utils"],"created_at":"2024-11-11T09:25:16.007Z","updated_at":"2025-04-27T17:32:18.522Z","avatar_url":"https://github.com/qiwi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# queuefy\n[![CI](https://github.com/qiwi/queuefy/actions/workflows/ci.yaml/badge.svg)](https://github.com/qiwi/queuefy/actions/workflows/ci.yaml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/2392bab0fb3bfa330f74/maintainability)](https://codeclimate.com/github/qiwi/queuefy/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/2392bab0fb3bfa330f74/test_coverage)](https://codeclimate.com/github/qiwi/queuefy/test_coverage)\n[![npm (tag)](https://img.shields.io/npm/v/queuefy)](https://www.npmjs.com/package/queuefy)\n\nWrapper to make any async handler act like a single thread with a queue.\n\n## Install\n```shell script\nyarn add queuefy\nnpm i queuefy\n```\n\n## Usage\n```typescript\nimport {queuefy} from 'queuefy'\n\nlet count = 0\nconst target = (param: number) =\u003e new Promise(resolve =\u003e\n  setTimeout(() =\u003e {\n    count++\n    resolve(count + param)\n  }, Math.random() * 100),\n)\nconst fn = queuefy(target)\nconst [r0, r1, r2, r3, r4] = await Promise.all([fn(4), fn(3), fn(2), fn(1), fn(0)])\n\n// r0 is 5\n// r1 is 5\n// r2 is 5\n// ... \n```\n\n## Alternatives\n* [sindresorhus/p-queue](https://github.com/sindresorhus/p-queue)\n\n## License\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiwi%2Fqueuefy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqiwi%2Fqueuefy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqiwi%2Fqueuefy/lists"}