Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
641 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var $ = require('../internals/export');
|
---|
| 2 | var ReflectMetadataModule = require('../internals/reflect-metadata');
|
---|
| 3 | var anObject = require('../internals/an-object');
|
---|
| 4 |
|
---|
| 5 | var ordinaryGetOwnMetadata = ReflectMetadataModule.get;
|
---|
| 6 | var toMetadataKey = ReflectMetadataModule.toKey;
|
---|
| 7 |
|
---|
| 8 | // `Reflect.getOwnMetadata` method
|
---|
| 9 | // https://github.com/rbuckton/reflect-metadata
|
---|
| 10 | $({ target: 'Reflect', stat: true }, {
|
---|
| 11 | getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
|
---|
| 12 | var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
|
---|
| 13 | return ordinaryGetOwnMetadata(metadataKey, anObject(target), targetKey);
|
---|
| 14 | }
|
---|
| 15 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.