{"id":13465068,"url":"https://github.com/isaacs/dezalgo","last_synced_at":"2025-03-16T09:33:19.800Z","repository":{"id":18222167,"uuid":"21362246","full_name":"isaacs/dezalgo","owner":"isaacs","description":"Contain async insanity so that the dark pony lord doesn't eat souls","archived":false,"fork":false,"pushed_at":"2023-04-15T20:45:37.000Z","size":340,"stargazers_count":90,"open_issues_count":4,"forks_count":10,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-03-10T05:09:14.721Z","etag":null,"topics":["npm-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isaacs.png","metadata":{"files":{"readme":"README.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},"funding":{"github":["isaacs"]}},"created_at":"2014-06-30T18:55:33.000Z","updated_at":"2024-11-19T20:25:41.000Z","dependencies_parsed_at":"2023-01-13T19:43:25.173Z","dependency_job_id":"7d613f3e-3c3f-497a-8c9d-053742b2ca2c","html_url":"https://github.com/isaacs/dezalgo","commit_stats":{"total_commits":21,"total_committers":8,"mean_commits":2.625,"dds":0.5714285714285714,"last_synced_commit":"be69a7df9baf05c367b3f090ebd4a9c89da8c1df"},"previous_names":["npm/dezalgo"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Fdezalgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Fdezalgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Fdezalgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaacs%2Fdezalgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaacs","download_url":"https://codeload.github.com/isaacs/dezalgo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809844,"owners_count":20351406,"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":["npm-cli"],"created_at":"2024-07-31T14:00:57.161Z","updated_at":"2025-03-16T09:33:19.515Z","avatar_url":"https://github.com/isaacs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/isaacs"],"categories":["JavaScript"],"sub_categories":[],"readme":"# dezalgo\n\nContain async insanity so that the dark pony lord doesn't eat souls\n\nSee [this blog\npost](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony).\n\n## USAGE\n\nPass a callback to `dezalgo` and it will ensure that it is *always*\ncalled in a future tick, and never in this tick.\n\n```javascript\nvar dz = require('dezalgo')\n\nvar cache = {}\nfunction maybeSync(arg, cb) {\n  cb = dz(cb)\n\n  // this will actually defer to nextTick\n  if (cache[arg]) cb(null, cache[arg])\n\n  fs.readFile(arg, function (er, data) {\n    // since this is *already* defered, it will call immediately\n    if (er) cb(er)\n    cb(null, cache[arg] = data)\n  })\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacs%2Fdezalgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaacs%2Fdezalgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaacs%2Fdezalgo/lists"}