core3-utils

@wixc3/common on Github

Home > @wixc3/common > get

get() function

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>;

Parameters

Parameter Type Description
obj O
key K

Returns:

ObjValue<O, K>

found value, *undefined* if map/value to not exist