{"id":31904830,"url":"https://github.com/pokatomnik/microdi","last_synced_at":"2026-05-18T19:01:53.979Z","repository":{"id":61176562,"uuid":"548981196","full_name":"pokatomnik/microdi","owner":"pokatomnik","description":"Deno Damn Simple Dependency Injection library","archived":false,"fork":false,"pushed_at":"2024-02-16T13:50:33.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dungeon-master","last_synced_at":"2025-10-02T11:43:56.724Z","etag":null,"topics":["deno","dependency-injection","di","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pokatomnik.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}},"created_at":"2022-10-10T13:42:57.000Z","updated_at":"2022-10-10T14:22:22.000Z","dependencies_parsed_at":"2022-10-12T06:08:08.514Z","dependency_job_id":null,"html_url":"https://github.com/pokatomnik/microdi","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pokatomnik/microdi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokatomnik%2Fmicrodi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokatomnik%2Fmicrodi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokatomnik%2Fmicrodi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokatomnik%2Fmicrodi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pokatomnik","download_url":"https://codeload.github.com/pokatomnik/microdi/tar.gz/refs/heads/dungeon-master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokatomnik%2Fmicrodi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015368,"owners_count":26085687,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["deno","dependency-injection","di","typescript","typescript-library"],"created_at":"2025-10-13T13:59:27.737Z","updated_at":"2025-10-13T13:59:54.215Z","avatar_url":"https://github.com/pokatomnik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n            S\nM i c r o D I\n          a M\n          m P\n          n L\n            E\n```\n\n## Very Simple Dependency Injection library for [Deno](https://deno.land)\n\n### tldr:\nProvide a service:\n```typescript\nimport { provide } from 'https://deno.land/x/microdi/Provider.ts';\n\nclass ServiceFoo {\n    public foo() {\n        console.log('Foo!');\n    }\n}\nprovide(\n    // The service you'd like to provide\n    ServiceFoo,\n    // Service dependencies (i.e. other services)\n    []\n);\n\nclass ServiceBar {\n    public bar() {\n        console.log('Bar!');\n    }\n}\nprovide(ServiceBar, []);\n\nclass ServiceFooBar {\n    public constructor(\n        private readonly foo: ServiceFoo,\n        private readonly bar: ServiceBar\n    ) {}\n}\nprovide(ServiceFooBar, [ServiceFoo, ServiceBar]);\n\nclass App {\n    public constructor(fooBar: ServiceFooBar) {}\n}\nprovide(App, [ServiceFooBar]);\n\nconst app = resolve(App); // App!\n```\n\n### Features:\n- No experimental decorators!\n- Lazy initialization: services are being instantiated on the fly on demand.\n- You can use a scope for your services. Just do the following:\n```typescript\nimport { ServicesMap } from 'https://deno.land/x/microdi/ServiceStorage.ts';\nconst servicesMap = new ServicesMap();\nclass Foo {}\nservicesMap.provides(Foo, []);\n```\n\n### Limitations:\n- Cyclic dependencies are not supported.\n- This library can instantiate services as a singletons only.\n- No typechecking at dependencies\n\n### Tests:\n```\n$ deno test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokatomnik%2Fmicrodi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpokatomnik%2Fmicrodi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokatomnik%2Fmicrodi/lists"}