source: trip-planner-front/node_modules/core-js/modules/esnext.reflect.has-metadata.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 959 bytes
Line 
1var $ = require('../internals/export');
2var ReflectMetadataModule = require('../internals/reflect-metadata');
3var anObject = require('../internals/an-object');
4var getPrototypeOf = require('../internals/object-get-prototype-of');
5
6var ordinaryHasOwnMetadata = ReflectMetadataModule.has;
7var toMetadataKey = ReflectMetadataModule.toKey;
8
9var ordinaryHasMetadata = function (MetadataKey, O, P) {
10 var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
11 if (hasOwn) return true;
12 var parent = getPrototypeOf(O);
13 return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
14};
15
16// `Reflect.hasMetadata` method
17// https://github.com/rbuckton/reflect-metadata
18$({ target: 'Reflect', stat: true }, {
19 hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
20 var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
21 return ordinaryHasMetadata(metadataKey, anObject(target), targetKey);
22 }
23});
Note: See TracBrowser for help on using the repository browser.