{"id":28337095,"url":"https://github.com/jeongbaebang/async-wave","last_synced_at":"2026-03-06T21:31:25.410Z","repository":{"id":159617560,"uuid":"634747780","full_name":"jeongbaebang/async-wave","owner":"jeongbaebang","description":"비동기 콜백을 순차 실행 및 관리를 간소화하는 JavaScript 비동기 라이브러리","archived":false,"fork":false,"pushed_at":"2025-11-18T00:54:43.000Z","size":943,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-18T02:27:15.738Z","etag":null,"topics":["async","axios","promise","promise-chain","typescript-definitions"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/async-wave","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/jeongbaebang.png","metadata":{"files":{"readme":"README-US.md","changelog":null,"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,"zenodo":null}},"created_at":"2023-05-01T04:39:22.000Z","updated_at":"2024-07-19T08:36:14.000Z","dependencies_parsed_at":"2025-06-19T22:42:55.690Z","dependency_job_id":null,"html_url":"https://github.com/jeongbaebang/async-wave","commit_stats":null,"previous_names":["jeongbaebang/async-wave","jeongbaebang/promise-vigilant"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/jeongbaebang/async-wave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongbaebang%2Fasync-wave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongbaebang%2Fasync-wave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongbaebang%2Fasync-wave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongbaebang%2Fasync-wave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeongbaebang","download_url":"https://codeload.github.com/jeongbaebang/async-wave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeongbaebang%2Fasync-wave/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30198661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","axios","promise","promise-chain","typescript-definitions"],"created_at":"2025-05-26T23:18:01.188Z","updated_at":"2026-03-06T21:31:25.385Z","avatar_url":"https://github.com/jeongbaebang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n   \u003cb\u003e\n      \u003cimg src=\"assets/async-wave.png\" alt=\"async-wave logo\" style=\"height: 300px; width:300px; border-radius: 50px;\"/\u003e\u003cbr\u003e\n   \u003c/b\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e`async-wave` is a safely executed asynchronous function that sequentially executes a chain of callback functions and returns the result. It safely transforms any value into a Promise and passes it as an argument to the asynchronous function. This allows for easy management of asynchronous operations and returning of results. Additionally, `asyncWave` provides intuitive implementation of error handling, success handling, and other logic through callback functions. This enables developers to write safe and efficient asynchronous code.\u003c/p\u003e\n\n- [🇰🇷 한국어](./README.md)\n\n## Table of Contents\n\n- [Installing](#installing)\n  - [Package manager](#package-manager)\n  - [CDN](#cdn)\n- [Usage](#usage)\n\n## Installing\n\n### Package manager\n\nUsing npm:\n\n```bash\n$ npm install async-wave\n```\n\nUsing yarn:\n\n```bash\n$ yarn add async-wave\n```\n\n### CDN\n\nUsing unpkg CDN:\n\n```html\n\u003cscript src=\"https://unpkg.com/async-wave@{{VERSION}}/dist/bundle.js\"\u003e\u003c/script\u003e\n```\n\n# Usage\n\n### Before\n\n```ts\n// Promises chaining\nawait setFetchLog();\nstartLoadingIndicator();\ngetGithubUser(USER_NAME)\n  .then(loadJson)\n  .then(showAvatar)\n  .then((githubUser) =\u003e console.log(`avatar_url: ${githubUser.avatar_url}`))\n  .catch((error) =\u003e console.error(error))\n  .finally(endLoadingIndicator);\n```\n\n### After\n\n```typescript\nimport { asyncWave } from 'async-wave';\n\n// if a function is passed as the first argument and its return value is not a promise, an error will be thrown.\nasyncWave\u003cGithubUser\u003e([USER_NAME, getGithubUser, loadJson], {\n  onBefore: async () =\u003e {\n    await setFetchLog(); // Errors inside the handler are also caught! [1]\n    startLoadingIndicator();\n  },\n  onSuccess: async (githubUser) =\u003e {\n    await showAvatar(githubUser); // Errors inside the handler are also caught! [2]\n    console.log(`avatar_url: ${githubUser.avatar_url}`);\n  },\n  onError: (error) =\u003e {\n    console.error(error);\n  },\n  onSettled: () =\u003e {\n    endLoadingIndicator();\n  },\n});\n```\n\n### Parameters\n\n- callbacks: An array of callback functions to be executed in the then method. (**Note: If a function is passed as the first argument and its return value is not a promise, an error will be thrown.**)\n- option (optional): An optional object that provides the following callback functions:\n  - onBefore: A function that runs before the promise starts. This function must be passed to the async function.\n  - onError: A function triggered when the promise reaches a rejected state.\n  - onSuccess: A function triggered when the promise reaches a resolved state. The result of the last promise is passed as an argument to this function.\n  - onSettled: A function triggered when the promise reaches either a resolved or a rejected state.\n\n### Return Value\n\nA Promise object that returns the result of the last promise in the chain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeongbaebang%2Fasync-wave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeongbaebang%2Fasync-wave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeongbaebang%2Fasync-wave/lists"}