{"_id":"@bjorkhaug/sreflect","_rev":"1-57165da5bed99e4f91e4a9f52f8f339d","name":"@bjorkhaug/sreflect","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"module":"./esm/mod.js","main":"./script/mod.js","name":"@bjorkhaug/sreflect","version":"0.0.1","description":"Simple reflection metadata for Deno and node.js, inspired by reflect-metadata","license":"MIT","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","scope":"@bjorkhaug"},"repository":{"type":"git","url":"git+https://github.com/simenbjorkhaug/sreflect.git"},"bugs":{"url":"https://github.com/simenbjorkhaug/sreflect/issues"},"exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"}},"scripts":{"test":"node test_runner.js"},"devDependencies":{"@types/node":"^18.11.9","picocolors":"^1.0.0","@deno/shim-deno":"~0.16.1"},"_id":"@bjorkhaug/sreflect@0.0.1","gitHead":"5535ab6b491b26e8a61858f1d8462ae21c7a5511","types":"./script/mod.d.ts","homepage":"https://github.com/simenbjorkhaug/sreflect#readme","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-AdQtrZxjSJ6UIWrHOPfZhNrRjdUn1s6veC6imToipuDnVaBD0q3XPveg5fDZNYmC7AWHCx+SwRsg68na1n5DIw==","shasum":"55205b2410123228804c3f1afd702462ad6809cc","tarball":"https://registry.npmjs.org/@bjorkhaug/sreflect/-/sreflect-0.0.1.tgz","fileCount":44,"unpackedSize":17882,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+bZ4/ERU8+MTjpEuRXqMIUHZwtDehOER37zsGXyFSlAIhAPI0p/pmHVU+6gLwVFbTLGFKFiM5OsA2enfy950YE1Eh"}]},"_npmUser":{"name":"simenbjorkhaug","email":"simen@bjorkhaug.io"},"directories":{},"maintainers":[{"name":"simenbjorkhaug","email":"simen@bjorkhaug.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sreflect_0.0.1_1700132141792_0.4529668799560673"},"_hasShrinkwrap":false},"0.0.2":{"module":"./esm/mod.js","main":"./script/mod.js","name":"@bjorkhaug/sreflect","version":"0.0.2","description":"Simple reflection metadata for Deno and node.js, inspired by reflect-metadata","license":"MIT","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","scope":"@bjorkhaug"},"repository":{"type":"git","url":"git+https://github.com/simenbjorkhaug/sreflect.git"},"bugs":{"url":"https://github.com/simenbjorkhaug/sreflect/issues"},"exports":{".":{"import":"./esm/mod.js","require":"./script/mod.js"}},"scripts":{"test":"node test_runner.js"},"devDependencies":{"@types/node":"^18.11.9","picocolors":"^1.0.0","@deno/shim-deno":"~0.16.1"},"_id":"@bjorkhaug/sreflect@0.0.2","gitHead":"197852200126f93fca90c342125fe3806a93d488","types":"./script/mod.d.ts","homepage":"https://github.com/simenbjorkhaug/sreflect#readme","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-FRt+Yo96soeZcVjKiPPfOixzCP0NmeqZ8s0dSHXeyTIJddzKi2TM0PXEkTA+qjT9pOEmCfnVsQwaqbeFnqjSMA==","shasum":"5dbb10862ded29f77448aa8ff02b3cdfc0bfd55e","tarball":"https://registry.npmjs.org/@bjorkhaug/sreflect/-/sreflect-0.0.2.tgz","fileCount":44,"unpackedSize":19593,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcrTy5rh2Fdn2i3ZUx2JhWAgqXYmsMu5XisMQE76phvAIhAKoHom43Wu/UC/LJ5O1nBuFY2FeLLnz0ftXH6u+uycXZ"}]},"_npmUser":{"name":"simenbjorkhaug","email":"simen@bjorkhaug.io"},"directories":{},"maintainers":[{"name":"simenbjorkhaug","email":"simen@bjorkhaug.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sreflect_0.0.2_1700158667161_0.07722908874676793"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-16T10:55:41.703Z","0.0.1":"2023-11-16T10:55:41.964Z","modified":"2023-11-16T18:17:47.517Z","0.0.2":"2023-11-16T18:17:47.341Z"},"maintainers":[{"name":"simenbjorkhaug","email":"simen@bjorkhaug.io"}],"description":"Simple reflection metadata for Deno and node.js, inspired by reflect-metadata","homepage":"https://github.com/simenbjorkhaug/sreflect#readme","repository":{"type":"git","url":"git+https://github.com/simenbjorkhaug/sreflect.git"},"bugs":{"url":"https://github.com/simenbjorkhaug/sreflect/issues"},"license":"MIT","readme":"# Reflect-metadata adapted to Symbol.metadata\n\nThis implementation does not follow spec completely, but implements some of the\nideas\\\nfrom tc39 proposals of decorator metadata and reflect-metadata.\n\nUse at your own risk / caution.\n\nCredit to: <https://github.com/rbuckton/reflect-metadata/>\n\nTypescript must emit metadata for this to work and the polyfill must be imported\nat the very\\\nentrypoint to your application.\n\n## Example of use\n\n---\n\n```typescript\n/**\n * Note: it is important to add sreflect to the very\n * beginning of your app to polyfill Reflect\n */\nimport '@bjorkhaug/sreflect'\n\n// Define metadata on an object\nconst obj = {}\nReflect.defineMetadata('key', 'value', obj)\n\n// Check if the object has the defined metadata\nif (Reflect.hasMetadata('key', obj)) {\n  // Metadata exists!\n}\n\n// Get the metadata value\nconst value = Reflect.getMetadata('key', obj)\n\n// Get all metadata keys\nconst keys = Reflect.getMetadataKeys(obj)\n\n// Delete the metadata\nReflect.deleteMetadata('key', obj)\n\n// Use the decorate function\nconst decorators = [\n  function (target: any) {\n    // ...\n  },\n]\nReflect.decorate(decorators, obj)\n```\n","readmeFilename":"README.md"}