es7.reflect.get-own-metadata-keys.js 364 B

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