{"id":21326253,"url":"https://github.com/masylum/i-love-async","last_synced_at":"2025-07-12T07:30:30.256Z","repository":{"id":66822736,"uuid":"1910264","full_name":"masylum/i-love-async","owner":"masylum","description":"\"Slides\" from the little talk I gave on the Barcelona nodejs meetup","archived":false,"fork":false,"pushed_at":"2011-06-17T09:20:32.000Z","size":92,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-11T03:26:20.686Z","etag":null,"topics":[],"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/masylum.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}},"created_at":"2011-06-17T09:19:08.000Z","updated_at":"2014-09-22T00:15:16.000Z","dependencies_parsed_at":"2023-02-20T12:11:08.356Z","dependency_job_id":null,"html_url":"https://github.com/masylum/i-love-async","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fi-love-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fi-love-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fi-love-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masylum%2Fi-love-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masylum","download_url":"https://codeload.github.com/masylum/i-love-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225802658,"owners_count":17526452,"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":[],"created_at":"2024-11-21T21:08:56.317Z","updated_at":"2024-11-21T21:08:56.887Z","avatar_url":"https://github.com/masylum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Async patterns\n\n  \"I love async, but I can't code like this \"\n\n# Functional approach\n\nSolving problems with imperative languages is done by defining \"HOW\"\n\n    do A, then do B, then you get C\n\nSolving problems with functional languages is done by defining \"WHAT\"\n\n    C is what you get from B once you did A\n\nAsynchronous code is not linear, so define your problems in a functional way if possible.\n\n# Chain/Serial pattern\n\nDo *n* asynchronous calls, one after each other.\n\n    Example:\n    get A from db, use A.id to get B from db, use B.id to get C\n\n# Parallel pattern\n\nDo *n* asynchronous calls, process them, and callback once we are done.\n\n    Example:\n    get A and B and do C when they are done\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasylum%2Fi-love-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasylum%2Fi-love-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasylum%2Fi-love-async/lists"}