Flattens own and inherited enumerable properties of obj into a fresh plain object.
obj
Source object (including prototype-chained or Proxy-wrapped objects)
A plain object containing all enumerable entries
Flattens own and inherited enumerable properties of
objinto a fresh plain object.