Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for serializing ES6 sets & maps #45
This fixes #12
It's fairly simple: the map/set contents are serialized as arrays (using
Note that this requires
If Map/Set serialization is needed in those environments it just needs an
I have only one concern. Regarding
It's less risky than the arrow function issue, because this is just using a new function, not new syntax. You should never hit issues with generic minification or linting tools as in #41 - it's only at runtime, and only if you're using IE11 and you're serializing Map/Set objects and you're not using any modern polyfills. The support is much better than arrow functions too: arrow function support starts at Node 6, while this works for Node 0.12+.
If you do want to fix it, there's a few options.
Option 3, we could just document it more explicitly. How would you feel if I just added the below to the docs?