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

15 lines
551 B
JavaScript
Raw Normal View History

2016-10-10 03:43:44 +02:00
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)
);
};
}});