Title: `.do` arguments not passed correctly · Issue #14 · HowProgrammingWorks/AsynchronousProgramming · GitHub
Open Graph Title: `.do` arguments not passed correctly · Issue #14 · HowProgrammingWorks/AsynchronousProgramming
X Title: `.do` arguments not passed correctly · Issue #14 · HowProgrammingWorks/AsynchronousProgramming
Description: The current implementation of the callback chain in 5a-chain passes data from the previous callback but doesn't pass arguments explicitly mentioned in .do(). In usage example readConfig callback is expected to receive myConfig as an argu...
Open Graph Description: The current implementation of the callback chain in 5a-chain passes data from the previous callback but doesn't pass arguments explicitly mentioned in .do(). In usage example readConfig callback is...
X Description: The current implementation of the callback chain in 5a-chain passes data from the previous callback but doesn't pass arguments explicitly mentioned in .do(). In usage example readConfig callbac...
Opengraph URL: https://github.com/HowProgrammingWorks/AsynchronousProgramming/issues/14
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`.do` arguments not passed correctly","articleBody":"The current implementation of the callback chain in `5a-chain` passes data from the previous callback but doesn't pass arguments explicitly mentioned in `.do()`.\n\nIn usage example `readConfig` callback is expected to receive `myConfig` as an argument.\n```\nconst startChain = chain()\n .do(readConfig, 'myConfig')\n .do(selectFromDb, 'select * from cities')\n .do(getHttpPage, 'http://kpi.ua')\n .do(readFile, 'README.md');\n```\nHowever it receives `undefined` instead.\n\nSo if callbacks would really depend on the previous one the chain would fail once it was called.\n\nAlso, should only the first callback in the chain receive an explicit argument, and the following ones receive their arguments from the previous one? Or should they receive both explicit and implicit arguments?","author":{"url":"https://github.com/jesuisYves","@type":"Person","name":"jesuisYves"},"datePublished":"2025-02-12T19:27:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/14/AsynchronousProgramming/issues/14"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ca976668-e92e-96b9-ef72-33a3a94ad149 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E544:25975D:3B3BC4F:51DE8EF:6977D985 |
| html-safe-nonce | 4ef6fac83be888c667e5917e886be2f18db0852390cb31010c68c2727637dc83 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTQ0OjI1OTc1RDozQjNCQzRGOjUxREU4RUY6Njk3N0Q5ODUiLCJ2aXNpdG9yX2lkIjoiMzk1OTU1OTQ2NzUzNTE2MTczMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 374de7e5f4445eadf186a769fc8cc06e5efb70a40292a08744c4c44ec2ee55af |
| hovercard-subject-tag | issue:2849165364 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/HowProgrammingWorks/AsynchronousProgramming/14/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0fc9436046ae7c442bf0c33664e2f71c7a3fb987e82260032ca57066906cb5fd/HowProgrammingWorks/AsynchronousProgramming/issues/14 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0fc9436046ae7c442bf0c33664e2f71c7a3fb987e82260032ca57066906cb5fd/HowProgrammingWorks/AsynchronousProgramming/issues/14 |
| og:image:alt | The current implementation of the callback chain in 5a-chain passes data from the previous callback but doesn't pass arguments explicitly mentioned in .do(). In usage example readConfig callback is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jesuisYves |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8909f95e78dc1ccc1b9acf9d5c963c2515579e48d2898151cf571437facd1d7b |
| turbo-cache-control | no-preview |
| go-import | github.com/HowProgrammingWorks/AsynchronousProgramming git https://github.com/HowProgrammingWorks/AsynchronousProgramming.git |
| octolytics-dimension-user_id | 17366055 |
| octolytics-dimension-user_login | HowProgrammingWorks |
| octolytics-dimension-repository_id | 65849630 |
| octolytics-dimension-repository_nwo | HowProgrammingWorks/AsynchronousProgramming |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 65849630 |
| octolytics-dimension-repository_network_root_nwo | HowProgrammingWorks/AsynchronousProgramming |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d6b13f6e4712dc1242cf12b5e75dec8b1bf3a9ab |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width