We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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: {}}
The text was updated successfully, but these errors were encountered:
PR's for this are more than welcome!
Sorry, something went wrong.
Add deepcloning for sets and maps.
8a17c90
Adds deepcloning functionality for Set and Map classes. Related to: davidmarkclements#17 Signed-off-by: JK <u.sslooky@gmail.com>
Add tests for sets and maps.
cdd179d
Adds standalone and nested tests for sets and maps. Related to: davidmarkclements#17 Signed-off-by: JK <u.sslooky@gmail.com>
Successfully merging a pull request may close this issue.
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:
The text was updated successfully, but these errors were encountered: