{"id":19097043,"url":"https://github.com/mascii/async-await-line-notify","last_synced_at":"2026-04-15T23:31:50.235Z","repository":{"id":100322988,"uuid":"89832242","full_name":"mascii/async-await-line-notify","owner":"mascii","description":"async/awaitを使い順番を守ってLINE Notify経由で通知を送るテスト","archived":false,"fork":false,"pushed_at":"2017-04-30T06:22:26.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T16:35:49.215Z","etag":null,"topics":["async-await","line-notify","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mascii.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}},"created_at":"2017-04-30T05:49:14.000Z","updated_at":"2017-04-30T06:19:18.000Z","dependencies_parsed_at":"2023-06-02T00:46:23.830Z","dependency_job_id":null,"html_url":"https://github.com/mascii/async-await-line-notify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mascii/async-await-line-notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascii%2Fasync-await-line-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascii%2Fasync-await-line-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascii%2Fasync-await-line-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascii%2Fasync-await-line-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mascii","download_url":"https://codeload.github.com/mascii/async-await-line-notify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mascii%2Fasync-await-line-notify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31864982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"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","line-notify","nodejs"],"created_at":"2024-11-09T03:38:34.701Z","updated_at":"2026-04-15T23:31:50.218Z","avatar_url":"https://github.com/mascii.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-await-line-notify\nasync/awaitを使い順番を守ってLINE Notify経由で通知を送るテスト\n\n## なぜ async/await を使ったか\nNode.jsで `0`, `1`, `2`, `3`, ..., `9` と順番にLINEへ通知を送りたかったが、非同期処理をfor文で回していたため、順番が前後して思った通りに通知を送れなかったことがあった。  \n順番が前後する問題をPromiseを使い解決を試みたが、Promiseでは不定回数の処理を回すことが難しいという新たな問題が発覚した。  \n後にasync/awaitを使うことでこの問題を解決できることがわかり、nodeのバージョンを6系(長期サポート版)から7系(最新機能版)に変更し、この問題をasync/awaitを使って解決を試みてみた。\n\n## 使い方\n`settings.js` にLINE Notify経由で通知したいトークルームのトークンを入れます。  \n`node line` で、1秒ごとに `0`, `1`, `2`, `3`, ..., `9` と通知が来ます。  \n(`await sleep(1000);` の行をコメントアウトしても順番通り通知が来るはずです)\n\n## 動作環境\n* macOS Sierra 10.12.4\n* node v7.9.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmascii%2Fasync-await-line-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmascii%2Fasync-await-line-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmascii%2Fasync-await-line-notify/lists"}