0.12.0 • Published 1 year ago
@abraham/reflection v0.12.0
Reflection
Lightweight ES Module implementation of reflect-metadata to work with TypeScript's experimental decorator support.
Why?
The main reason for this library is to provide a much smaller implementation that can be included as a module.
- ES module
reflection
can be loaded with<script type="module" src="..."></script>
- Size (uncompressed)
reflect-metadata
is ~50Kcore-js/es7/reflect
is ~80K@abraham/reflection
is ~3K
Read about how to drop 20K from your production Angular app by switching to this.
Install
npm install @abraham/reflection
Usage
import '@abraham/reflection';
Reflect.defineMetadata(metadataKey, metadataValue, target);
You can also import Reflection
:
import { Reflection as Reflect } from '@abraham/reflection';
Reflect.defineMetadata(metadataKey, metadataValue, target);
API
Reflection does not currently cover the complete API surface of reflect-metadata. The following methods are available:
Reflect.decorate(...);
Reflect.defineMetadata(...);
Reflect.getMetadata(...);
Reflect.hasMetadata(...);
Reflect.getOwnMetadata(...);
Reflect.hasOwnMetadata(...);
Reflect.metadata(...);
0.12.0
1 year ago
0.11.0
2 years ago
0.10.0
2 years ago
0.9.0
2 years ago
0.9.1
2 years ago
0.8.0
3 years ago
0.7.0
4 years ago
0.6.0
5 years ago
0.5.1
5 years ago
0.5.0
5 years ago
0.4.2
6 years ago
0.4.1
6 years ago
0.4.0
6 years ago
0.3.0
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago