es7.reflect.get-own-metadata.js 384 B

12345678910
  1. var metadata = require('./_metadata');
  2. var anObject = require('./_an-object');
  3. var ordinaryGetOwnMetadata = metadata.get;
  4. var toMetaKey = metadata.key;
  5. metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
  6. return ordinaryGetOwnMetadata(metadataKey, anObject(target)
  7. , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
  8. } });