{"id":13623537,"url":"https://github.com/abraham/reflection","last_synced_at":"2025-05-15T04:06:24.013Z","repository":{"id":41557098,"uuid":"142037416","full_name":"abraham/reflection","owner":"abraham","description":"Lightweight (3K) ES Module implementation of reflect-metadata","archived":false,"fork":false,"pushed_at":"2025-03-08T21:43:23.000Z","size":502,"stargazers_count":275,"open_issues_count":2,"forks_count":16,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-08T15:50:21.699Z","etag":null,"topics":["decorators","hacktoberfest","javascript","metadata","reflect-metadata","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@abraham/reflection","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/abraham.png","metadata":{"funding":{"github":"abraham"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-23T16:00:38.000Z","updated_at":"2025-04-25T15:28:36.000Z","dependencies_parsed_at":"2024-01-14T08:09:17.649Z","dependency_job_id":"2084cdc0-71ab-479d-948b-e10437cddcea","html_url":"https://github.com/abraham/reflection","commit_stats":{"total_commits":685,"total_committers":11,"mean_commits":62.27272727272727,"dds":0.3211678832116789,"last_synced_commit":"63cda42c5e65170903d73ccd55da7df062b373b1"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abraham%2Freflection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abraham%2Freflection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abraham%2Freflection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abraham%2Freflection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abraham","download_url":"https://codeload.github.com/abraham/reflection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270646,"owners_count":22042859,"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":["decorators","hacktoberfest","javascript","metadata","reflect-metadata","typescript"],"created_at":"2024-08-01T21:01:32.886Z","updated_at":"2025-05-15T04:06:18.990Z","avatar_url":"https://github.com/abraham.png","language":"TypeScript","readme":"[![Version Status](https://img.shields.io/npm/v/@abraham/reflection.svg?style=flat\u0026label=version\u0026colorB=4bc524)](https://npmjs.com/package/@abraham/reflection)\n[![Build Status](https://github.com/abraham/reflection/workflows/Index/badge.svg)](https://github.com/abraham/reflection/actions)\n[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@abraham/reflection.svg?style=flat\u0026colorB=4bc524)](https://bundlephobia.com/result?p=@abraham/reflection)\n[![Coverage Status](https://coveralls.io/repos/github/abraham/reflection/badge.svg?branch=master)](https://coveralls.io/github/abraham/reflection?branch=master)\n\n# Reflection\n\nLightweight ES Module implementation of [reflect-metadata](https://github.com/rbuckton/reflect-metadata/) to work with TypeScript's [experimental decorator support](https://www.typescriptlang.org/docs/handbook/decorators.html).\n\n## Why?\n\nThe main reason for this library is to provide a much smaller implementation that can be included as a module.\n\n- ES module\n  - `reflection` can be loaded with `\u003cscript type=\"module\" src=\"...\"\u003e\u003c/script\u003e`\n- Size (uncompressed)\n  - [`reflect-metadata`](https://github.com/rbuckton/reflect-metadata) is ~50K\n  - [`core-js/es7/reflect`](https://github.com/zloirock/core-js) is ~80K\n  - `@abraham/reflection` is ~3K\n\nRead about how to [drop 20K from your production Angular app](https://bendyworks.com/blog/drop-20k-from-your-production-angular-app) by switching to this.\n\n## Install\n\n```sh\nnpm install @abraham/reflection\n```\n\n## Usage\n\n```ts\nimport '@abraham/reflection';\nReflect.defineMetadata(metadataKey, metadataValue, target);\n```\n\nYou can also import `Reflection`:\n\n```ts\nimport { Reflection as Reflect } from '@abraham/reflection';\nReflect.defineMetadata(metadataKey, metadataValue, target);\n```\n\n## API\n\nReflection does not currently cover the complete API surface of reflect-metadata. The following methods are available:\n\n```ts\nReflect.decorate(...);\nReflect.defineMetadata(...);\nReflect.getMetadata(...);\nReflect.hasMetadata(...);\nReflect.getOwnMetadata(...);\nReflect.hasOwnMetadata(...);\nReflect.metadata(...);\n```\n","funding_links":["https://github.com/sponsors/abraham"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabraham%2Freflection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabraham%2Freflection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabraham%2Freflection/lists"}