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

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