Closed derekparsons718 closed 3 years ago
I would love to see support added for the native Map and Set types.
They are becoming increasingly popular and I use them all the time. But the current behavior when cloning them is to return an empty object:
const data = { set: new Set([1, 2, 3]), map: new Map([ ["a", 1], ["b", 2], ["c", 3] ]) }; console.log(data); // {set: {1, 2, 3}, map: {"a" => 1, "b" => 2, "c" => 3}} console.log(clone(data)); // {set: {}, map: {}}
PR's for this are more than welcome!
I would love to see support added for the native Map and Set types.
They are becoming increasingly popular and I use them all the time. But the current behavior when cloning them is to return an empty object: