MCPcopy
hub / github.com/tinymce/tinymce / has

Function has

modules/katamari/src/main/ts/ephox/katamari/api/Obj.ts:103–104  ·  view source on GitHub ↗
(obj: T, key: K)

Source from the content-addressed store, hash-verified

101};
102
103export const has = <T extends {}, K extends keyof T>(obj: T, key: K): boolean =>
104 hasOwnProperty.call(obj, key);
105
106export const hasNonNullableKey = <T extends {}, K extends keyof T>(obj: T, key: K): obj is T & Record<K, NonNullable<T[K]>> =>
107 has(obj, key) && obj[key] !== undefined && obj[key] !== null;

Callers 2

getFunction · 0.70
hasNonNullableKeyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected