wallet-core/node_modules/core-js/modules/es7.reflect.metadata.js
2017-05-28 00:40:43 +02:00

15 lines
551 B
JavaScript

var metadata = require('./_metadata')
, anObject = require('./_an-object')
, aFunction = require('./_a-function')
, toMetaKey = metadata.key
, ordinaryDefineOwnMetadata = metadata.set;
metadata.exp({metadata: function metadata(metadataKey, metadataValue){
return function decorator(target, targetKey){
ordinaryDefineOwnMetadata(
metadataKey, metadataValue,
(targetKey !== undefined ? anObject : aFunction)(target),
toMetaKey(targetKey)
);
};
}});