Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reflect-metadata

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reflect-metadata

Polyfill for Metadata Reflection API

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14M
decreased by-1.43%
Maintainers
1
Weekly downloads
 
Created

What is reflect-metadata?

The reflect-metadata npm package is a library that allows developers to perform metadata reflection operations in JavaScript. It is based on the metadata reflection API that is proposed for ECMAScript and is used by frameworks like Angular and decorators to add and read metadata annotations.

What are reflect-metadata's main functionalities?

Metadata Reflection

Allows defining metadata on a class or property. The code sample shows how to define custom metadata on a class 'MyClass' with a key 'custom' and a value 'metadataValue'.

Reflect.defineMetadata('custom', 'metadataValue', MyClass);

Metadata Retrieval

Enables retrieval of metadata from a class or property. The code sample demonstrates how to retrieve metadata from a class 'MyClass' using the key 'custom'.

let metadataValue = Reflect.getMetadata('custom', MyClass);

Metadata Deletion

Provides functionality to delete metadata from a class or property. The code sample illustrates how to delete metadata associated with a class 'MyClass' using the key 'custom'.

Reflect.deleteMetadata('custom', MyClass);

Other packages similar to reflect-metadata

Keywords

FAQs

Package last updated on 29 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc