MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / getOwnMetadata

Method getOwnMetadata

packages/metadata/src/reflect.ts:55–65  ·  view source on GitHub ↗

* get own metadata for a target object or it's property/method

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

Source from the content-addressed store, hash-verified

53 * get own metadata for a target object or it's property/method
54 */
55 getOwnMetadata(
56 metadataKey: string,
57 target: Object,
58 propertyKey?: string,
59 ): any {
60 metadataKey = this.getMetadataKey(metadataKey);
61 if (propertyKey) {
62 return Reflect.getOwnMetadata(metadataKey, target, propertyKey);
63 }
64 return Reflect.getOwnMetadata(metadataKey, target);
65 }
66
67 /**
68 * Check if the target has corresponding metadata

Callers 12

decorateMethod · 0.80
getParameterIndexMethod · 0.80
getClassMetadataMethod · 0.80
getAllMethodMetadataMethod · 0.80
getMethodMetadataMethod · 0.80
getPropertyMetadataMethod · 0.80
getParameterMetadataMethod · 0.80
runTestsFunction · 0.80
reflect.unit.tsFile · 0.80

Calls 1

getMetadataKeyMethod · 0.95

Tested by 1

runTestsFunction · 0.64