MCPcopy
hub / github.com/loopbackio/loopback-next / hasMetadata

Method hasMetadata

packages/metadata/src/reflect.ts:73–83  ·  view source on GitHub ↗

* Check if the target has corresponding metadata * @param metadataKey - Key * @param target - Target * @param propertyKey - Optional property key

(
    metadataKey: string,
    target: Object,
    propertyKey?: string,
  )

Source from the content-addressed store, hash-verified

71 * @param propertyKey - Optional property key
72 */
73 hasMetadata(
74 metadataKey: string,
75 target: Object,
76 propertyKey?: string,
77 ): boolean {
78 metadataKey = this.getMetadataKey(metadataKey);
79 if (propertyKey) {
80 return Reflect.hasMetadata(metadataKey, target, propertyKey);
81 }
82 return Reflect.hasMetadata(metadataKey, target);
83 }
84
85 hasOwnMetadata(
86 metadataKey: string,

Callers 1

runTestsFunction · 0.80

Calls 1

getMetadataKeyMethod · 0.95

Tested by 1

runTestsFunction · 0.64