MCPcopy
hub / github.com/tldraw/tldraw / getOwnProperty

Function getOwnProperty

packages/utils/src/lib/object.ts:49–55  ·  view source on GitHub ↗
(obj: object, key: string)

Source from the content-addressed store, hash-verified

47export function getOwnProperty(obj: object, key: string): unknown
48/** @internal */
49export function getOwnProperty(obj: object, key: string): unknown {
50 if (!hasOwnProperty(obj, key)) {
51 return undefined
52 }
53 // @ts-expect-error we know the property exists
54 return obj[key]
55}
56
57/**
58 * An alias for `Object.keys` that treats the object as a map and so preserves the type of the keys.

Callers 15

validateRecordMethod · 0.90
getTypeMethod · 0.90
applyDiffMethod · 0.90
requiredEnvFunction · 0.90
getShapeUtilMethod · 0.90
getBindingUtilMethod · 0.90
getAssetUtilMethod · 0.90
_extractSharedStylesMethod · 0.90
getShapeStyleIfExistsMethod · 0.90
styleFromComputedStyleFunction · 0.90

Calls 1

hasOwnPropertyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…