I have a variable that could be an Object, a Map, or neither. I can easily check for objects with typeof, but I need to conditionally Map.map() the variable if it is a Map, and typeof doesn't work with maps. Any suggestions?
I have a variable that could be an Object, a Map, or neither. I can easily check for objects with typeof, but I need to conditionally Map.map() the variable if it is a Map, and typeof doesn't work with maps. Any suggestions?