{"id":22139722,"url":"https://github.com/nerdbeere/simpledi-async","last_synced_at":"2026-02-16T01:43:53.681Z","repository":{"id":136633209,"uuid":"41901449","full_name":"nerdbeere/simpledi-async","owner":"nerdbeere","description":null,"archived":false,"fork":false,"pushed_at":"2015-09-04T07:19:58.000Z","size":264,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-04T23:34:56.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/nerdbeere.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":"2015-09-04T06:36:58.000Z","updated_at":"2015-09-04T06:36:58.000Z","dependencies_parsed_at":"2023-04-24T16:47:58.515Z","dependency_job_id":null,"html_url":"https://github.com/nerdbeere/simpledi-async","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nerdbeere/simpledi-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdbeere%2Fsimpledi-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdbeere%2Fsimpledi-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdbeere%2Fsimpledi-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdbeere%2Fsimpledi-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nerdbeere","download_url":"https://codeload.github.com/nerdbeere/simpledi-async/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdbeere%2Fsimpledi-async/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29498345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T01:11:49.942Z","status":"ssl_error","status_checked_at":"2026-02-16T01:07:16.834Z","response_time":118,"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":[],"created_at":"2024-12-01T20:17:23.337Z","updated_at":"2026-02-16T01:43:53.653Z","avatar_url":"https://github.com/nerdbeere.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# simpledi-async\n\n## API\n\n### `di.get(name)`\n\nSynchronously resolves dependencies.\n\n**Warning:** There can't be any async dependencies in the chain. If an async dependency is detected it will throw an error.\n\n#### Example:\n\n```javascript\nvar myConfig = di.get('myConfig');\n```\n\n### `di.get(name, callback)`\n\nAsynchronously resolves dependencies.\n\n#### Example:\n\n```javascript\ndi.get('myConfigFromCdn', function(error, config) {\n  // do something with config\n});\n```\n\n### `di.register(name, function)`\n### `di.registerAsync(name, function)`\n\n#### Example:\n\n```javascript\n\n// Example: sync\ndi.register('myConfig', function() {\n  return {\n    config: true\n  }\n});\n\n// Example: async\ndi.registerAsync('myConfig', function(done) {\n  xhr('http//config.js', done)\n});\n```\n\n### `di.register(name, dependencies, function)`\n### `di.registerAsync(name, dependencies, function)`\n\n#### Example:\n\n```javascript\n\n// Example: sync\ndi.register('myConfig', ['otherConfig'], function(otherConfig) {\n  return {\n    otherConfig: otherConfig\n    config: true\n  }\n});\n\n// Example: async\ndi.registerAsync('myConfig', ['cdnUrl'], function(cdnUrl, done) {\n  xhr(cdnUrl + '/config.js', done)\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerdbeere%2Fsimpledi-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnerdbeere%2Fsimpledi-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerdbeere%2Fsimpledi-async/lists"}