{"id":17419168,"url":"https://github.com/axtgr/discope","last_synced_at":"2025-08-22T09:47:24.760Z","repository":{"id":41058580,"uuid":"507580058","full_name":"axtgr/discope","owner":"axtgr","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-01T13:02:17.000Z","size":1146,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-19T13:40:02.047Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axtgr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://www.buymeacoffee.com/axtgr"]}},"created_at":"2022-06-26T13:20:38.000Z","updated_at":"2022-08-13T11:54:45.000Z","dependencies_parsed_at":"2022-08-13T12:40:09.634Z","dependency_job_id":null,"html_url":"https://github.com/axtgr/discope","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axtgr%2Fdiscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axtgr%2Fdiscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axtgr%2Fdiscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axtgr%2Fdiscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axtgr","download_url":"https://codeload.github.com/axtgr/discope/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241465077,"owners_count":19967243,"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-10-17T02:17:17.952Z","updated_at":"2025-03-02T05:45:10.676Z","avatar_url":"https://github.com/axtgr.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/axtgr"],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e\n\n\u003ch1 align=\"center\"\u003e🕺 Discope\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/wildcard-match\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/discope\" alt=\"npm package\"\u003e\u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://bundlephobia.com/package/wildcard-match\"\u003e\u003cimg src=\"https://img.shields.io/bundlephobia/minzip/discope?color=%23b4a\u0026label=size\" alt=\"size\"\u003e\u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://github.com/axtgr/wildcard-match/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/workflow/status/axtgr/discope/CI?label=CI\u0026logo=github\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://www.buymeacoffee.com/axtgr\"\u003e\u003cimg src=\"https://img.shields.io/badge/%F0%9F%8D%BA-Buy%20me%20a%20beer-red?style=flat\" alt=\"Buy me a beer\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n## Quickstart\n\n```\nnpm install discope\n```\n\n```js\nimport { scope, singleton, factory } from 'discope'\nimport pino from 'pino'\nimport { createConfig } from './config.js'\nimport App from './App.js'\n\nconst servicesScope = scope((deps) =\u003e {\n  const logger = factory(({ name }) =\u003e {\n    return pino({ name, level: deps.config.logLevel })\n  })\n  return { logger }\n})\n\nconst appScope = scope(() =\u003e {\n  const config = singleton(() =\u003e createConfig())\n  const { logger } = servicesScope({ config })\n  const app = singleton(() =\u003e new App({ config: config(), logger: logger('App') }))\n  return { app }\n})\n\nconst app = appScope()()\napp.start()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxtgr%2Fdiscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxtgr%2Fdiscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxtgr%2Fdiscope/lists"}