JSON.stringify() won’t work for ES6 Set

It will just return “{}”, no matter if the Set is empty.

This also means deep clone based on JSON won’t work.

If JSON.stringify() matters to you, use Array instead of Set

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.