{"id":18285510,"url":"https://github.com/bemit/service-service","last_synced_at":"2025-10-14T09:36:27.725Z","repository":{"id":50712588,"uuid":"518413467","full_name":"bemit/service-service","owner":"bemit","description":"NodeJS service and configuration container with strong typings.","archived":false,"fork":false,"pushed_at":"2022-08-26T20:08:16.000Z","size":333,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T23:59:36.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bemit.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-07-27T10:33:58.000Z","updated_at":"2022-08-01T00:10:46.000Z","dependencies_parsed_at":"2022-09-07T17:12:14.794Z","dependency_job_id":null,"html_url":"https://github.com/bemit/service-service","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bemit/service-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fservice-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fservice-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fservice-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fservice-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bemit","download_url":"https://codeload.github.com/bemit/service-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fservice-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018625,"owners_count":26086404,"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-14T02:00:06.444Z","response_time":60,"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":[],"created_at":"2024-11-05T13:16:53.365Z","updated_at":"2025-10-14T09:36:27.670Z","avatar_url":"https://github.com/bemit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ServiceService\n\n[![npm (scoped)](https://img.shields.io/npm/v/service-service?style=flat-square)](https://www.npmjs.com/package/service-service)\n[![Github actions Build](https://github.com/bemit/service-service/actions/workflows/blank.yml/badge.svg)](https://github.com/bemit/service-service/actions)\n[![MIT license](https://img.shields.io/npm/l/service-service?style=flat-square)](https://github.com/bemit/service-service/blob/main/LICENSE)\n[![Coverage Status](https://img.shields.io/codecov/c/github/bemit/service-service/main.svg?style=flat-square)](https://codecov.io/gh/bemit/service-service/branch/main)\n![Typed](https://flat.badgen.net/badge/icon/Typed?icon=typescript\u0026label\u0026labelColor=blue\u0026color=555555)\n\nDead simple service and config container, with lazy initialization and strong typings.\n\n```typescript\nimport { ServiceContainer } from 'service-service'\n\nclass ExampleService {\n    private readonly name: string\n\n    constructor(name: string, options: { a: string }) {\n        this.name = name\n    }\n\n    getName() {\n        return this.name\n    }\n}\n\nexport interface AppConfig {\n    name: string\n}\n\nexport const container = new ServiceContainer\u003cAppConfig\u003e()\n\n// specify configuration values:\ncontainer.configure('name', 'Example App')\n// get configuration values:\ncontainer.config('name')\n\n// define services, pass `constructor` params as array:\ncontainer.define(ExampleService, [\n    'the-name',\n    {\n        a: 'a-value',\n    },\n])\n\n// provide params as function, for lazy execution (on first `use`)\ncontainer.define(ExampleService, () =\u003e [\n    'the-name',\n    {\n        a: 'a-value',\n    },\n])\n\n// use the service:\nconst service = container.use(ExampleService)\nservice.getName() // will return `the-name`\n```\n\n\u003e ESM only package\n\n## License\n\n[MIT License](https://github.com/bemit/service-service/blob/main/LICENSE)\n\n© 2022 [bemit](https://bemit.codes)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemit%2Fservice-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbemit%2Fservice-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemit%2Fservice-service/lists"}