{"id":23404897,"url":"https://github.com/tylersayshi/duckhawk","last_synced_at":"2026-02-15T15:42:46.889Z","repository":{"id":266741837,"uuid":"899185965","full_name":"tylersayshi/duckhawk","owner":"tylersayshi","description":"🐦 native Promise based implementations of bluebird utilities","archived":false,"fork":false,"pushed_at":"2025-11-02T20:19:22.000Z","size":919,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-08T06:17:13.874Z","etag":null,"topics":["async-await","bluebird-promise","deno","jsr","promise-library"],"latest_commit_sha":null,"homepage":"https://jsr.io/@tyler/duckhawk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tylersayshi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-12-05T19:25:17.000Z","updated_at":"2025-11-02T20:19:26.000Z","dependencies_parsed_at":"2025-04-11T21:26:26.599Z","dependency_job_id":"fd207291-cc0d-479d-b12b-a016eca07c9d","html_url":"https://github.com/tylersayshi/duckhawk","commit_stats":null,"previous_names":["tylersayshi/duckhawk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tylersayshi/duckhawk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylersayshi%2Fduckhawk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylersayshi%2Fduckhawk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylersayshi%2Fduckhawk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylersayshi%2Fduckhawk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tylersayshi","download_url":"https://codeload.github.com/tylersayshi/duckhawk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylersayshi%2Fduckhawk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29482692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T15:33:17.885Z","status":"ssl_error","status_checked_at":"2026-02-15T15:32:53.698Z","response_time":118,"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":["async-await","bluebird-promise","deno","jsr","promise-library"],"created_at":"2024-12-22T13:16:33.201Z","updated_at":"2026-02-15T15:42:46.874Z","avatar_url":"https://github.com/tylersayshi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# duckhawk\n\nNative Promise based implementations of bluebird utilities with zero dependencies and miniature bundle size.\n\n\u003cimg src=\"https://raw.githubusercontent.com/tylersayshi/duckhawk/main/img/falcon.png\" alt=\"Duckie the hawk\" width=\"200\" height=\"200\" /\u003e\n\n## Install\n\nInstructions on jsr: https://jsr.io/@tyler/duckhawk\n\n## Docs\n\n### allChunked\n\nThis helper is unique to duckhawk. We support easily running a large list of promises `n` at a time. This is useful for avoiding issues like running out of memory in Promise.all, avoiding being throttled with too many requests, and avoiding concurrent writes to the same resource.\n\n```ts\nimport { allChunked } from \"duckhawk\";\n\nconst result = await allChunked(\n  [Promise.resolve(1), Promise.resolve(2), Promise.resolve(3)],\n  2\n);\n\nconsole.log(result); // [1, 2, 3]\n```\n\n### map\n\nBluebird equivalent: http://bluebirdjs.com/docs/api/promise.map.html\n\nThis awaits each promise in parallel and passes the result to the iterator. The result of the iterator is\nreturned as an array.\n\n```ts\nimport { map } from \"duckhawk\";\n\nconst result = await map([1, 2, 3], (item) =\u003e Promise.resolve(item + 1));\n```\n\nconcurrency can be passed to limit the number of promises to run a specific number at a time. Otherwise, we will run with Promise.all.\n\n```ts\nimport { map } from \"duckhawk\";\n\nconst result = await map([1, 2, 3], (item) =\u003e Promise.resolve(item + 1), {\n  concurrency: 2,\n});\n```\n\n### mapSeries\n\nBluebird equivalent: http://bluebirdjs.com/docs/api/promise.mapseries.html\n\nThis awaits each promise in series and passes the result to the iterator. The result of the iterator is\nreturned as an array.\n\n```ts\nimport { mapSeries } from \"duckhawk\";\n\nconst result = await mapSeries([1, 2, 3], (item) =\u003e Promise.resolve(item + 1));\n\nconsole.log(result); // [2, 3, 4]\n```\n\n### props\n\nBluebird equivalent: http://bluebirdjs.com/docs/api/promise.props.html\n\nWe implement props with `Promise.allSettled` to give the same easy api for resolving a list of promises\nas key/value pairs.\n\n```ts\nimport { props } from \"duckhawk\";\n\nconst result = await props({\n  one: fetch(\"https://pokeapi.co/api/v2/pokemon/1\").then((res) =\u003e res.json()),\n  two: fetch(\"https://pokeapi.co/api/v2/pokemon/2\").then((res) =\u003e res.json()),\n  three: fetch(\"https://pokeapi.co/api/v2/pokemon/3\").then((res) =\u003e res.json()),\n});\n```\n\n### reduce\n\nBluebird equivalent: http://bluebirdjs.com/docs/api/promise.reduce.html\n\nThis awaits each promise in series and passes the result to the iterator. The final accumulator is returned if all promises resolve successfully.\n\n```ts\nimport { reduce } from \"duckhawk\";\n\nconst result = await reduce(\n  [1, 2, 3],\n  (acc, item) =\u003e Promise.resolve(acc + item),\n  0\n);\n\nconsole.log(result); // 6\n```\n\n## Notes\n\nWe do not plan to achieve 100% parity with bluebird. If you find this library useful and want a feature added, please open an issue :).\n\n## The Why\n\nThis is for moving away from bluebird in favor of native Promises and async/await. Some of the bluebird methods are useful and easy to re-implement in native Promises, so we've added the ones we need here.\n\nIf you're starting a project from scratch, I'd encourage writing your own promise utils. Feel free to copy-paste any of the ones from here as examples! But, the main motivator for using this as a library is for an easy off-ramp for large projects that use bluebird in many places and want a super simple refactor path.\n\nIf you want to replace bluebird with a zero dependency library, this should be a great fit!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylersayshi%2Fduckhawk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylersayshi%2Fduckhawk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylersayshi%2Fduckhawk/lists"}