Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

esnext.reflect.get-own-metadata.js 688B

1234567891011121314151617
  1. 'use strict';
  2. // TODO: Remove from `core-js@4`
  3. var $ = require('../internals/export');
  4. var ReflectMetadataModule = require('../internals/reflect-metadata');
  5. var anObject = require('../internals/an-object');
  6. var ordinaryGetOwnMetadata = ReflectMetadataModule.get;
  7. var toMetadataKey = ReflectMetadataModule.toKey;
  8. // `Reflect.getOwnMetadata` method
  9. // https://github.com/rbuckton/reflect-metadata
  10. $({ target: 'Reflect', stat: true }, {
  11. getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
  12. var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
  13. return ordinaryGetOwnMetadata(metadataKey, anObject(target), targetKey);
  14. }
  15. });