wallet-core/node_modules/core-js/modules/es7.reflect.metadata.js

16 lines
498 B
JavaScript
Raw Normal View History

2017-08-14 05:01:11 +02:00
var $metadata = require('./_metadata');
var anObject = require('./_an-object');
var aFunction = require('./_a-function');
var toMetaKey = $metadata.key;
var ordinaryDefineOwnMetadata = $metadata.set;
2017-05-28 00:38:50 +02:00
2017-08-14 05:01:11 +02:00
$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
return function decorator(target, targetKey) {
2017-05-28 00:38:50 +02:00
ordinaryDefineOwnMetadata(
metadataKey, metadataValue,
(targetKey !== undefined ? anObject : aFunction)(target),
toMetaKey(targetKey)
);
};
2017-08-14 05:01:11 +02:00
} });