Home > @wixc3/common > get
Similar to Map.get, but works for plain objects, and returns undefined for null maps and missing keys
Signature:
export declare function get<O extends object, K extends keyof O>(obj: O, key: K): ObjValue<O, K>;
Parameter | Type | Description |
---|---|---|
obj | O | |
key | K |
Returns:
ObjValue<O, K>
found value, *undefined* if map/value to not exist